deployd / docs

documentation for deployd
http://docs.deployd.com
29 stars 30 forks source link

Running as a node module example code still requires - 'resource' folder, DB.connectionstring #75

Open moorthi07 opened 7 years ago

moorthi07 commented 7 years ago

Running as a node module example code still requires - 'resource' folder, DB.connectionstring

http://docs.deployd.com/docs/server/as-a-node-module.html `

// hello.js var deployd = require('deployd') , options = {port: 3000};

var dpd = deployd(options);

dpd.listen(); Run this like any other node program.

node hello.js`

You can access 'localhost:3000/dashboard' - you will be prompted for a athenticate key prompt,

Use dpd showkey to get your app's key. Authenticate with your deployd dashboard:

Error: Error loading resources: Error: ENOENT: no such file or directory, scandir 'C:\IMwebsites\dpdtest\resources' at Error (native)

session:error Error removing old sessions: MongoError: not authorized on deployd to execu te command { delete: "sessions", deletes: [ { q: { $or: [ { lastActive: { $lt: 149012190157 4.0 } }, { lastActive: { $exists: false } } ] }, limit: 0 } ], ordered: true } +0ms

Update: You will need the following steps before you can run.

  1. Create 'resources' directory in the root directory
  2. Set up db.connectionstring in options At the first run dpd will look for these info.

FIX: You would need minimum options to be set, ` //

hello.js var deployd = require('deployd') , options = {port: 3000,env: 'development', db: { connectionString: 'mongodb://localhost:27017/interface'

} };

var dpd = deployd(options);

dpd.listen(); `