Ensure you have the following installed on your local development environment:
- Node.js (version 16.11.10 or later recommended)
- npm or yarn
- Docker (for running in production mode)
- Clone the repository to your local machine:
git clone https://github.com/hwennnn/Stream2Gather- Navigate to the project directory:
cd backend- Install the dependencies:
npm install
# or
yarn install-
Create a
.envfile in the root directory and add your environment variables. Use the.env.examplefile as a reference. -
Generate environment types:
npm run gen-env
# or
yarn gen-env- Start the development server:
npm run dev
# or
yarn dev- Alternatively, you can start the server using the compiled files:
npm run dev2
# or
yarn dev2- Build the project:
npm run build
# or
yarn build- Start the production server:
npm run prod
# or
yarn prodVisit this link for comprehensive installation guides.
- Build the Docker image:
docker build -t stream2gather-backend .- Run the Docker container:
docker run -t -p 8080:8080 stream2gather-backend- To run TypeORM CLI commands:
npm run typeorm
# or
yarn typeorm