Skip to main content

Get started with Deployd

Here are the steps to get started with deployd. (On windows).
And it also covers how to over come some startup issues.

Prerequisite: 

  1.  NodeJS (must)
  2.  MongoDB (must ) 


1. Install Deployd Command line (dpd-cli ) first.

> npm install dpd-cli -g
2. Follow the below from your 'WORKSPACE' folder. Don't create a folder yet.
Below command will create a project folder , basic project files and all dependencies in the node_modules folder.
So, it will take few minutes (to install all dependencies)

>dpd create your-project-name

3. Then follow  if you are greeted with some errors as shown below.


c:\\Deployd\dpd_tutorial>dpd create tute-1
dpd is installing the dependencies... please be patient (this may take a few minutes)
to start your app:
$ cd tute-1
$ dpd

c:\\Deployd\dpd_tutorial>cd tute-1

c:\\Deployd\dpd_tutorial\tute-1>dpd
deployd CLI version 2.0.2
starting deployd
Failed to start MongoDB (Make sure 'mongod' are in your $PATH or use dpd --mongod option. Ref: http://docs.deployd.com/docs/basics/cli.html)

c:\\Deployd\dpd_tutorial\tute-1>dpd --mongod "C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"
deployd CLI version 2.0.2
starting deployd
Failed to start MongoDB (Make sure 'mongod' are in your $PATH or use dpd --mongod option. Ref: http://docs.deployd.com/docs/basics/cli.html)


c:\\Deployd\dpd_tutorial\tute-1>dpd -h

Usage: dpd [options] [command]


Options:

-V, --version output the version number
-m, --mongod [path] path to mongod executable (defaults to `mongod`)
-p, --port [port] port to host server (defaults to 2403)
-w, --wait wait for input before exiting
-d, --dashboard start the dashboard immediately
-o, --open open in a browser
-e, --environment [env] defaults to development
-H, --host [host] specify host for mongo server
-P, --mongoPort [mongoPort] mongodb port to connect to
-n, --dbname [dbname] name of the mongo database
-a, --auth <auth> usesrname:password mongo server credentials
-u, --username <username> The user to authenticate as
-s, --password <password> The user's password
-c, --dbconn <dbconnectionstring> The MongoDB Connection String
--deploydPath [deploydPath] allow overriding the path to deployd main script
-h, --help output usage information


Commands:

create [project-name] create a project in a new directory
eg. `dpd create my-app`
keygen generate a key for remote access (./.dpd/keys.json)
showkey shows current key for connecting to remote dashboard (./.dpd/keys.json)
* [default] start the server in the current project in development mode
with an interactive shell/repl for interacting with the running server
e.g. dpd (starts server in current directory),
dpd my-app/app.dpd (starts app from file)

c:\\Deployd\dpd_tutorial\tute-1>dpd -m "C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"
deployd CLI version 2.0.2
starting deployd
Failed to start MongoDB (Make sure 'mongod' are in your $PATH or use dpd --mongod option. Ref: http://docs.deployd.com/docs/basics/cli.html)

c:\\Deployd\dpd_tutorial\tute-1>dpd -m "C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"
deployd CLI version 2.0.2
starting deployd
ls: no such file or directory: c:/Deployd/dpd_tutorial/tute-1/resources/**/config.json
listening on port 2403
type help for a list of commands
dpd >
(To exit, press ^C again or type .exit)
dpd >

4. Once you run >dpd , the server starts at localhost:2403 by default.


Browse to : localhost:2403 
You will see this blow page loaded.  You are successfully started with Deplyd!.

Welcome to Deployd!

You've just created a Deployd app. You can add front-end files in the public folder.
If you're new to Deployd, have a look at the Getting Started Guide or Hello World Tutorial.

5. But... not ready yet
This simple install is mostly for the production -purpose.  But need to start developing your APIs. To do that you need 'dpd-dashboard' and that package has a dependency for 'dpd-clientlib' - you need these to easily create 'REST APIs'. We will see that in the next topic.

Comments

Popular posts from this blog

Deployd presentation by PV at Silicon Valley - South Bay JS group @ Shape Security

Details : (Videos below) South Bay JS Jarrod Overson Hosted by  Jarrod Overson From  South Bay JavaScript Meetup Wednesday, February 14, 2018 6:30 PM  to  8:30 PM Every 2nd Wednesday of the month until March 13, 2018 Shape Security 800 West El Camino Real, Mountain View, CA · 4th Floor, CA 4th Floor (NOT SECOND ANYMORE!) This Wednesday's meetup we'll have 3 speakers starting at 7pm. Doors open at 6:30pm and there will be pizza and drinks available. Long-form Talk: Speaker: Moorthi Pichaikannu Title: Simple, easy and rapid API development with Deployd - node.js and MongoDB opensource framework Description : The core of IOT is APIs of Things and at this talk you will see how to design, build, and scale APIs for web and mobile apps in minutes instead of days using Deployd , nodejs opensource framework. If you are a web developer with java, asp.net, python etc, you will learn the same basic concepts of request, response, sessio