Skip to content

PuZheng/chuangye-mis-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chuangye-mis-backend

This backend uses postgresql, so you should setup postgresql at the beginning, and you should install extension pgcrypto

quick start

setup postgresql

  • create role/database
$ sudo -i -u postgresql  # login as user postgresql
postgresql$ createuser foo_user # create a postgresql role
postgresql$ createdb foo_db
  • if no corresponding system user, create it

Upon installation Postgres is set up to use ident authentication, which means that it associates Postgres ROLES with a matching Unix/Linux system account. If a role exists within Postgres, a Unix/Linux username with the same name will be able to sign in as that role.

  • give the newly create user a password to connect the db
$ sudo -i -u foo_user foo_db psql
# enter psql shell
foo_user=# \password
  • edit configuration dbConnection (in config.js)

install dependencies

$ npm install

generate keys

genreate public, private keys using generate-key.sh, refer to http://stackoverflow.com/questions/5244129/use-rsa-private-key-to-generate-public-key

initialize data

$ node create-schema.js
$ node setup-admin.js
  • or for development environment, create test data
$ node make-test-data.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published