Tool lending server, backend to inventory-app
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api
init
models
routes
www
.babelrc
.dockerignore
.eslintrc.js
.gitattributes
.gitignore
Dockerfile.template
LICENSE
README.md
config.json
index.js
initDB.sh
package.json
utils.js

README.md

inventory-server

Tool lending server, backend to inventory-app

Build Setup

# install dependencies
npm install

# serve API at localhost:3000, webapp at localhost:3050
npm run start

Environnement variables to set

# ports for api & webapp
API_PORT : default 3000
WEBAPP_PORT : default 3050
# select which DB to use
NODE_ENV : development, development_local, production, production_local

resin.io deployment

This simple server can be run on a raspberry pi using resin.io

To get this project up and running, you will need to signup for a resin.io account here and set up a device, have a look at our Getting Started tutorial. Once you are set up with resin.io, you will need to clone this repo locally:

$ git clone git@github.com:ESAAAlab/inventory-server.git

Then add your resin.io application's remote repository to your local repository:

$ git remote add resin username@git.resin.io:username/myapp.git

Take a look at Dockerfile.template and initDB.sh to configure your image for your network, and change the default passwords for postgres and inventory users. Then push the code to the newly added remote:

$ git push resin master

It should take a few minutes for the code to push. Don't forget to set the environment variables in your application dashboard.


This project was inspired by Michael Herman