StillPointSpace-Invoice-App production site
- Git
- NodeJS - version 10.x LTS (the latest 10.x LTS available known as
lts/carbon
)- It is recommended to use
nvm
to manage your NodeJS installation and versions. If you are not on a *nix based environment, and are required to develop in a Windows environmentnvm-windows
is a good alternative.
- It is recommended to use
- PostgreSQL - version 7.x is currently used
If you are developing on Mac OS X, we recommend installing the required tools with Homebrew by running:
brew install git
brew install nvm
brew install postgresql
Run brew services start postgresql
to start postgresql after install.
-
Clone repository:
$ git clone [email protected]:stillpointspaces-invoice/production.git
-
Install node package dependencies:
$ npm ci
- Note we prefer
npm ci
overnpm install
as it is more strict about following thepackage-lock.json
file and also is quicker.
- Note we prefer
-
Configure dotenv file
- Create the
.env
file using the template:- $
cp .env.template .env
- $
- Edit the
.env
file with your appropriate ENV variable options:- $
vim .env
- $
- Minimally required ENV keys that need to be defined to run locally include the following:
- DB_HOST, DB_NAME, DB_PORT
- SERVER_HOST, SERVER_PORT
- In development, you can comment out the
DB_USER
andDB_PASS
if your local PostgreSQL instance doesnt require user auth
- Create the
-
db migration
$ npm run db:migrate -
restore migration
$ npm run db:restore
-
Start the server
$ npm run start
-
View the development environment website at
http://localhost:3001