-
-
Notifications
You must be signed in to change notification settings - Fork 688
Development
You need Node.js, git, and npm installed. Node v22 and pnpm v10.15 were used in the development of this project. I can not guarantee earlier versions will work.
- Clone the project and set it as the current directory
git clone https://github.com/Viren070/AIOStreams.gitcd aiostreams - Install project dependencies
pnpm i - Build the project
pnpm run build
To start the addon in development mode, run the following command:
pnpm run start:dev
Only changes to the server package have hot reload, meaning no need to rebuild/restart. However, if you make a change in the core package, that needs to be rebuilt.
pnpm -F core run build
Similarly, any changes to frontend also require a rebuild.
pnpm -F frontend run build
It is also possible to develop the frontend package with hot reload, but it requires a bit of extra work.
The frontend requires itself to be connected to the server in order to function correctly, therefore for development purposes, set the NEXT_PUBLIC_BACKEND_BASE_URL environment variable to the currently running backend before running the dev command for the frontend. You can do this by adding a .env.development file in the frontend package:
NEXT_PUBLIC_BACKEND_BASE_URL=http://localhost:3001
You should change the PORT environment variable in the root .env to something other than 3000, this is the port the server listens on.
Then, simply run pnpm dev and both the frontend, server, and core packages will have hot reload. The Next.js dev server is set up to automatically proxy API requests to the backend server at the URL we provided above. So the frontend with hot load will be available at http://localhost:3000 and the server is also accessible at http://localhost:3001 but it is not necessary to use this backend URL. If you are only testing backend changes, I'd recommend using pnpm run start:dev instead to avoid starting the Next.js dev server unnecessarily.