Deployed at https://uclaradio-blog.herokuapp.com/
- KeystoneJS: framework for developing database-driven websites, applications and APIs in Node.js.
- Node.js: JavaScript run-time environment. We'll be using it with KeystoneJS
- MongoDB: a document-oriented database program.
- KeystoneJS: framework for developing database-driven websites, applications and APIs in Node.js.
git clone https://github.com/uclaradio/uclaradio-blog.git
- Install all the packages:
npm install --save
- Add the configuration files to the repo
- Message codeowners for access.
- In one terminal
- Run mongod:
mongod
- In a second terminal
- Run keystone server:
npm start
- You'll know you've succeeded when you see:
KeystoneJS v4.0.0 started:
uclaradio-blog is ready on http://0.0.0.0:3010
- The dev version is served at localhost:3010.
We are currently deploying to Heroku with git.
-
Setting up Heroku for the first time:
- Download the Heroku CLI.
- Login to Heroku from your terminal.
heroku login
- You'll be prompted to login with your heroku user credentials. Message the codeowners for access.
- Add Heroku's remote git repository. Now, local repository will have pushing access to both this github repo and to heroku's git repo.
heroku git:remote -a uclaradio-blog
-
Deploying the app to Heroku:
- Ensure that you're on the master branch of this github.
git checkout master
- Push your app to Heroku
git push heroku master
- The production version is served at uclaradio-blog.herokuapp.com/.
- Navigate to the Admin UI /keystone
- Login with user credentials in
updates/0.0.1-admin.js
GET
all postsGET
post by ID
- "Cannot find module './config.json'"
- You don't have the
config.json
for authentication. Message the codeowners for it.
- You don't have the
- "failed to connect to server [ds141924.mlab.com:41924] on first connect [MongoError: connection 0 to ds141924.mlab.com:41924 timed out]"
- You're probably on lame wifi. Switch to a good one like
eduroam
.
- You're probably on lame wifi. Switch to a good one like
- "Another mongod instance is already running on the /data/db directory, terminating"
- You can only have (and need) 1 mongod instance running locally. Closing all your browsers won't close the instance.
- Find the pid of the instance.
ps -ax | grep mongod
- Kill the pid of the mongod instance, which is listed in the first column.
kill <pid>