yarn install
-
MacOS:
brew install postgres
-
Ubuntu:
sudo apt update
sudo apt install postgresql postgresql-contrib
-
Before run and test connection, make sure you have created a database as described in the above configuration. You can use the
psql
command to create a user and database.psql -U postgres
-
Type this command to creating a new database.
postgres=> CREATE DATABASE development OWNER postgres;
postgres=> \q
yarn reset
yarn start:dev
yarn start
http://localhost:8080/api-docs (local host)
http://host_name/api-docs
See instructions in a docker
folder if you want to run this backend alongside with a frontend and a database. In this case you don't need to build docker image manually and run commands below.
- Make sure you have Postgres installed locally like in Adjust local db:
- Build an image
docker build -t um-backend-image .
- Run a container
docker run -p 8080:8080 -d um-backend-image
- Now the api should be available by
http://localhost:8080/api