The purpose of this API is essentially to handle user data around the deployments on PaaS Admin through out to their environments.
npm run build # compile the build to ./dist
npm run test # run all the tests and linters
npm run lint # run code linters
npm run fix # try to autofix problems with js/css
npm run start # rebuild and start the server
- Node.js version
~ 10LTS - consider using NVM (nvm usein this repo) for version management - npm versions
~ 6 - postgres versions
~> 9
If you are planning to run this locally, you will likely need to have a
postgres database ready.
This can be achieved with:
docker run --rm -it -p 5432:5432 -d postgres --name paas-deploymentsThis will spin up postgres instance. You then should be able to get into the
instance and setup your database.
Run the following to log into the instance:
psql -h 0.0.0.0 -p 5432 -U postgresOnce in the instance, run following to create a database:
CREATE DATABASE deployments;You then can quit the client (\q) and close that connection. It will keep
postgres running in the background.
If you happen to want to wipe the DB or not run it again, run the following command:
docker kill paas-deploymentsClone this repository and then use npm to install the project dependencies:
npm installExecute the unit tests to ensure everything looks good:
npm run testStart the server pointing at stubbed APIs
export DATABASE_URL=postgres://postgres@localhost:5432/deployments
npm run startYou can then interact with the API with the use of curl or Postman.