Skip to content

Latest commit

 

History

History
110 lines (74 loc) · 3.27 KB

File metadata and controls

110 lines (74 loc) · 3.27 KB

Stream2Gather-backend

Prerequisites

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)

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/hwennnn/Stream2Gather
  1. Navigate to the project directory:
cd backend
  1. Install the dependencies:
npm install
# or
yarn install

Environment Setup

  1. Create a .env file in the root directory and add your environment variables. Use the .env.example file as a reference.

  2. Generate environment types:

npm run gen-env
# or
yarn gen-env

Running the Development Server

  1. Start the development server:
npm run dev
# or
yarn dev
  1. Alternatively, you can start the server using the compiled files:
npm run dev2
# or
yarn dev2

Building the Project

  1. Build the project:
npm run build
# or
yarn build
  1. Start the production server:
npm run prod
# or
yarn prod

Running with Docker

1. Install Docker Desktop

Visit this link for comprehensive installation guides.

2. Run in Docker (production mode)

  1. Build the Docker image:
docker build -t stream2gather-backend .
  1. Run the Docker container:
docker run -t -p 8080:8080 stream2gather-backend

Scripts

  • To run TypeORM CLI commands:
npm run typeorm
# or
yarn typeorm