probate-api v0.0.1
Probate API
Getting started
Make sure you have NodeJS installed or later and have connected to a running Postgres instance.
Clone the project and install the dependencies:
npm iGet db submodule
git submodule add <git@github ...> db/serverGet the development server running and auto-reloading:
npm run devWhen ready for production run npm run build, which will transpile the code from ES6 to ES5, compatible with most NodeJS versions, to the dist folder.
npm start will start the production server reading from the dist folder.
Create Environment
eb create staging-env --single --cname probateapp-web-st --cfg probateapp-web-prDeploy
Because of the need for a build process EB is configured to deploy a ZIP archive. By using the following command it will deploy the archive stored in 'dist/archive.zip' and give it the version label of the first sever characters of the last commit.
eb deploy --nohang -l `date +'%Y%m%d%m%S'`-`git log --format="%H" -n 1 | cut -c1-7`Database
The configuration file .sequelizerc for sequelize-cli specifies the location of the environment config, migration, and seeder data. A sample environment configuration file can be can be found at server/config/sequelize.json.sample. Copy this file to sequelize.json in the same location and edit it with your specific development environment settings. This file is ignored by git to ensure that no passwords are stored in the repository.
Install the sequelize-cli tool with the following command:
npm install -g sequelize-cli pgRun the following commands to create the tables, apply migrations, and populate any initial data.
sequelize db:migrate --url $POSTGRES_URsequelize db:seed:all --url $POSTGRES_UR5 years ago