Boilerplate for a React/Express/PostgreSQL app.
First step: cd into the backend directory.
$ cd backendThen, you need to make a .env file with the contents of the .env.txt file.
$ cp .env.txt .envNow you can launch the backend by running:
$ docker compose upThis runs the backend server on http://localhost:5000. Also the PgAdmin server on http://localhost:8080.
To execute the migrations:
$ docker compose exec backend npm run typeorm migration:run -- -d ./dist/data-source.jsTo revert the last migration:
$ docker compose exec backend npm run typeorm migration:revert -- -d ./dist/data-source.jsFirst step: cd into the frontend directory.
$ cd frontendThen, you need to make a .env file with the contents of the .env.txt file.
$ cp .env.txt .envThe frontend can be launched by running:
$ npm run devor if you use yarn
$ yarn devThis runs the frontend server on http://localhost:3000. All requests will be proxied to the backend.
Both the frontend and backend can be deployed by running in /:
$ docker compose -f docker-compose-prod.yml upThis runs the deployed website on http://localhost:8000.
In doc folder:
- endpoints
Boilerplate inspired in https://github.com/V-Wong/pern-stack-template