inboundnow / inbound-pro

Inbound Pro Plugin for WordPress - Landing Page Framework, Calls to Action Framework, Visitor Analytics & List Segmentation, Email Campaigns & Marketing Automation
https://www.inboundnow.com
31 stars 17 forks source link

Instructions to deploy API code #48

Closed DavidWells closed 9 years ago

DavidWells commented 9 years ago
  1. Generate https://help.github.com/articles/generating-ssh-keys/ for yourself
  2. Send me the RSA key https://help.github.com/articles/generating-ssh-keys/#step-4-add-your-ssh-key-to-your-account
  3. Then send me the key.
  4. Clone down https://github.com/inboundnow/inbound-api and read the readme to install
  5. Install the Express api locally and run it.
  6. Work locally on code and push changes to API
  7. Then SSH into the digital ocean box. Depends on step 3
  8. then change directories into inbound-api
  9. then stop the pm2 process with pm2 kill
  10. then git pull origin master to pull latest node code
  11. then restart pm2 with pm2 start pm2-config.json

Rinse and repeat 8 through 11 to make live updates to api.inboundnow.com

Also, you need to learn Node more specifically express: http://expressjs.com/ here is a tutorial on express APIs https://scotch.io/tutorials/build-a-restful-api-using-node-and-express-4

Start mongo daemon and node server.js to run the api locally at port 3001

atwellpub commented 9 years ago

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiKHMrjPqnfYzhOC47D4WS7rtDA1Nn0yl/L+QU6gBj1mI3Q4ZbR4w6tQvuIrIvHodZiGZ0nLwU+fhhrTMtvLXGYMuwRRZZ3zbx/0xQLFhKyAQ/8JHq3kBTZfdbmOYRzvBLf+h5621fZNPmfZSdmQtjFITyFOZAjFNFXbUQjDwc7k= rsa-key-20130824

atwellpub commented 9 years ago

Quick Summaries

NodeJS

node server.js npm install npm install modulename

Express

MongoDB

mongod ( mine is already started at windows startup) mongo show dbs help (lists command) http://docs.mongodb.org/manual/reference/mongo-shell/

Make a Windows Service: SC CONFIG MongoDB binPath= f:\Dropbox\Websites\local\mongodb\bin\mongod.exe --config --httpinterface F:/Dropbox/Websites/local/mongodb/bin/mongodb.conf --service