Skip to content

ngocdon0127/museum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

Config

1. From the root of source code, run these commands:

$ cp config/config.js.example config/config.js
$ npm install

2. Config database

Start MongoDB
$ mongod --dbpath="path\to\mongodb\storage\directory"
Copy file initDB.js to the folder you installed MongoDB (usually C:\Program Files\MongoDB\Server\xxx\bin) and run this command from there:
$ mongo initDB.js
Or change line 6 of file config/config.js from url: 'mongodb://mongodbuser:[email protected]:27017/museum' to the url in mLab server (will email you)

3. Initialize

Config data.json and run

$ node initialize.js

4. Install pm2

$ npm install -g pm2

Run

From the root of source code:

$ npm install
$ pm2 start run.js --name museum

Use

Open http://localhost:8000 or http://127.0.0.1:8000 in browser (Chrome, Firefox, ...)

Stop

$ pm2 delete museum

Export

Open a terminal (Ctrl + Atl + T) and run $ cd museum $ ./run-export-all.sh CSV files will be generated and copied to exports folder