uek-109-LBb/counter_kand/backend
informaticker 2883a1aa07 Add readme
2024-07-03 07:23:28 +00:00
..
config initial commit 2024-07-02 08:54:15 +00:00
entrypoints initial commit 2024-07-02 08:54:15 +00:00
src Add readme 2024-07-03 07:23:28 +00:00
.dockerignore initial commit 2024-07-02 08:54:15 +00:00
.example-env initial commit 2024-07-02 08:54:15 +00:00
.sequelizerc initial commit 2024-07-02 08:54:15 +00:00
Dockerfile initial commit 2024-07-02 08:54:15 +00:00
package-lock.json initial commit 2024-07-02 08:54:15 +00:00
package.json initial commit 2024-07-02 08:54:15 +00:00
README.md initial commit 2024-07-02 08:54:15 +00:00

Backend

Environment Variables

NODE_ENV=development

# Database Information
DB_HOST=localhost
DB_NAME=database
DB_USER=postgres
DB_PASSWORD=password

# Test Secret for /api/health/secret
PASSPHRASE=secret

Available Scripts

Migrations

The backend provides the following commands to initiate the database and run the migrations.

# create database
npx sequelize-cli db:create

# run migrations
npx sequelize-cli db:migrate

Run the app

Run the development environment

npm run dev

Runs the app in the development mode.

Open http://localhost:8080 to view the backend in the browser. Open http://localhost:3100 to view the frontend in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

Run the production environment

npm start

Runs the app in the production mode. Open http://localhost:8080 to view the backend in the browser. Open http://localhost:3100 to view the frontend in the browser.