Skip to step 5 if you have git, sqlite3 and node installed. The rest of the instructions are OS agnostic.
- Install Node.js
- Install SQLite3 by downloading the DLL(s) and putting it in C:\WINDOWS\system32
- Install Git for windows. For linux:
apt-get install git
- ** If on Windows, open the GitHub Desktop client and let it complete the Git installation, then open the Git Shell **
- Make a directory for the project:
mkdir code
and move into the new folder:cd ./code
- Clone project:
git clone https://github.com/capttrousers/quickdata.git
. - This will create a
quickdata
folder inside thecode
directory. Move into new project directory:cd ./quickdata
. - Run
npm install
to install all dependencies / node modules and packages. - Run
npm run build
to make sure you have the latest build of the front end code. - (Optional) Run
npm run test
to run tests, but many of these will probablay fail unless you set up the db config (config/config.prod.json
). - Run project:
node ./server.js
and navigate tolocalhost:8080
in a browser to see the quick data tool.
+++++++++++++++
PROD CD
+++++++++++++++
$ ssh
$ cd to project
$ git pull
$ rm -rf node_modules // optional, hard reset
$ npm install
$ npm run build
$ pm2 list
$ pm2 restart appname
++++++++++++++++++ new prod install ++++++++++++++++++
- install nginx sqlite3 node
- clone repo and build
- set NODE_ENV=production env variable: $ printf '# export node env variable\nexport NODE_ENV="production"\n' >> ~/.bashrc && source ~/.bashrc
- copy prod db creds conf file and run tests
- copy nginx sites-available conf
- setup pm2: start and startup