-
Notifications
You must be signed in to change notification settings - Fork 29
Description
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.
- Create 'resources' directory in the root directory
- 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();
`