Quick start Mongo with Deployd
Mongodb it’s … well we all know it ^^
Deployd it’s an open source platform to build, and scale APIs for web and mobile apps in minutes instead of days.
Let’s get started
run this command dpd create todos to make a dpd directory (dpd ctreate <project_name>) if you don’t specify project name a default one will be provided my-deployd-app.
navigate to your newproject cd todos
make index.js write the the following:
By default mongo on local instance don’t have username/password if you want to provide them append this in db :
credentials: { username: 'username', password: 'password' }
You can also provide connection string by doing like this:
db: {
connectionString = "mongodb://..."
}
Make a directory resources (add empty file if erros occuer)
Then run the server node index.js, and navigate to localhost:5000/dashboard
Go ahead and make new collection and make some props:
Finally fill up your database in DATA section, you can check it by using the mongo shell.