Skip to content

Live investment simulation system for presentation and demo day based on node.js and mongodb

License

Notifications You must be signed in to change notification settings

virus-lab/live-investment-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

live-investment-tool

Live investment simulation system for presentation and demo day based on node.js and mongodb.

Guide

Guide for non-developer

Install

mongodb

# brew install mongodb

Settings

# git clone https://github.com/virus-dev/live-investment-tool
./live-investment-tool# npm install

Usage

Set keys

  1. duplicate public/key_sample.js as public/key.js
  2. add keys in public/key.js

Run database

./live-investment-tool$ mkdir db
./live-investment-tool$ mongod --dbpath db

to reset: $ killall -15 mongod

Always Run database

# mongod --fork --logpath mongod.log --dbpath ./live-investment-tool/db

to reset:

# mongo
>> show dbs
>> use rst_invest
>> db.dropDatabase()
>> show dbs

Run

./live-investment-tool# npm start

http://localhost:3000/invest
http://localhost:3000/invest-result

Always Run

# 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

For Lightsail

Settings

~/workspace$ git clone https://github.com/virus-lab/live-investment-tool
~/workspace/live-investment-tool$ npm install

Install/Run database

$ 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

Port settings

~$ cd /opt/bitnami
/opt/bitnami$ sudo ./ctlscript.sh stop apache

Add 'Custom - TCP - 3000' on lightsail - networking

Run

~/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

Guide

{ip_address}: invest.ejs {ip_address}/list: list.ejs {ip_address}/result: result.ejs

Dependencies

  • nodejs
  • express
  • mongodb
  • mongoose
  • forever
  • mongodb-server

About

Live investment simulation system for presentation and demo day based on node.js and mongodb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published