Boilerplate for a React/Express/PostgreSQL app.
The backend can be launched by running in /
:
$ docker-compose up
This 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.js
To revert the last migration:
docker-compose exec backend npm run typeorm migration:revert -- -d ./dist/data-source.js
The frontend can be launched by running in /frontend
:
$ npm run dev
This 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 up
This runs the deployed website on http://localhost:8000.
In doc folder:
- endpoints
Boilerplate inspired in https://github.com/V-Wong/pern-stack-template