Live investment simulation system for presentation and demo day based on node.js and mongodb.
# brew install mongodb
# git clone https://github.com/virus-dev/live-investment-tool
./live-investment-tool# npm install
- duplicate
public/key_sample.js
aspublic/key.js
- add keys in
public/key.js
./live-investment-tool$ mkdir db
./live-investment-tool$ mongod --dbpath db
to reset:
$ killall -15 mongod
# mongod --fork --logpath mongod.log --dbpath ./live-investment-tool/db
to reset:
# mongo
>> show dbs
>> use rst_invest
>> db.dropDatabase()
>> show dbs
./live-investment-tool# npm start
http://localhost:3000/invest
http://localhost:3000/invest-result
# forever --minUptime 5 --spinSleepTime 5 start /root/live-investment-tool/bin/www
to check:
# forever list
to stop:# forever stop /root/live-investment-tool/bin/www
~/workspace$ git clone https://github.com/virus-lab/live-investment-tool
~/workspace/live-investment-tool$ npm install
$ sudo apt-get install mongodb-server
~/workspace/live-investment-tool$ mkdir db
~/workspace$ sudo mongod --fork --logpath mongod.log --dbpath ./live-investment-tool/db
$ sudo killall -u mongodb
~$ cd /opt/bitnami
/opt/bitnami$ sudo ./ctlscript.sh stop apache
Add 'Custom - TCP - 3000' on lightsail - networking
~/workspace/live-investment-tool$ sudo npm start
~/workspace/live-investment-tool$ sudo forever --minUptime 5 --spinSleepTime 5 start ./bin/www
~/workspace/live-investment-tool$ sudo forever list
~/workspace/live-investment-tool$ sudo forever stop ./bin/www
{ip_address}
: invest.ejs
{ip_address}/list
: list.ejs
{ip_address}/result
: result.ejs
- nodejs
- express
- mongodb
- mongoose
- forever
- mongodb-server