This a backend to the ModClima test.
- First of all install the dependencies. You can type
yarn install
to install all dependencies.
- Then you can chose from one of the run mode below.
-
Create a postgres database with postgis and postgis_topology
-
Create the .env file in the root directory
-
Put DATABASE_URL environment variable in the .env file
- Format of DATABASE_URL: postgres://user':'password'@'host'/'database'
- Example: DATABASE_URL=postgres://user:123@127.0.0.1/modclima
-
Type in your terminal:
yarn start
-
Observations:
- yarn start run with nodejs
-
Create a postgres database with postgis and postgis_topology
-
Create the .env file in the root directory
-
Put DATABASE_URL environment variable in the .env file
- Format of DATABASE_URL: postgres://user':'password'@'host'/'database'
- Example: DATABASE_URL=postgres://user:123@127.0.0.1/modclima
-
Type in your terminal:
yarn dev
-
Observations:
- yarn dev run with nodemon
- Create a postgres database with postgis and postgis_topology
- Create the .env.test file in the root directory
- Put DB_STRING_CONNECTION environment variable in the .env.test file
- Format of DATABASE_URL: postgres://'user':'password'@'host'/'database'
- Example: DATABASE_URL=postgres://user:123@127.0.0.1/modclimatest
- Type in your terminal
yarn test
To see the documentation run your application in start ou dev mode and access the /api-docs route or access documentation