Reputation: 2149
I am close to deploying my first node app (KeystoneJS) + mongoDb and I was thinking of using Digital Ocean. This would be the first node app I have deployed and first time using Digital Ocean. I've tried to find tutorials or guides from other people deploying an app built on keystone but have failed to uncover one. I would greatly appreciate it someone could share the steps they used to deploy a node app + keystone + mongo they built.
Thank you.
Upvotes: 3
Views: 2858
Reputation: 11
It's quite simple yet nobody explains in detail. I had to bang my head for a while and I got it all figured out. I'm not a Linux specialist.
First, you set up a droplet with MEAN configuration. That takes care of the MongoDB and the Node setup.
Then you'll have to make Mongo to run as process:
Mongo
Step 1: Remove lock file.
sudo rm /var/lib/mongodb/mongod.lock
Step 2: Repair mongodb.
mongod --repair
Step 3:
sudo mongod --port 27017 --fork --logpath /var/log/mongodb.log
Step 4: Check status of mongodb.
mongo
After that, once you moved your keystone project into your opt/mean folder, running node keystone in your terminal should do it.
You'll see something like:
KeystoneJS Started:<br/>
[your project name] is ready on port 3000
I highly recommend you start by running your project on your local machine first and move it after you're able to run it on localhost:3000.
Upvotes: 7