Public | Automated Build

Last pushed: a month ago
Short Description
udaChef ad service
Full Description

Ad service

This repo's purpose is to fetch kitchen data.

How to setup locally
  1. Checkout the repo
  2. Run docker build -t <name-of-service> .
  3. Start the server by running
    docker run -p <port-you-want>:3000 -e MONGO_USER=<username-for-db> -e MONGO_PASSWORD=<password-for-db> <name-of-service>
  4. The server is now available at localhost:<port-you-want>
How to setup locally (without Docker)
  1. Checkout the repo
  2. Run npm install
  3. Start the server by running
    node index.js
  4. The server is now available at `localhost:3000

Heroku

Deploy updates to heroku
  1. Commit the changes as you would normally
  2. Install the Heroku CLI toolbelt https://devcenter.heroku.com/articles/heroku-cli
  3. Login to Heroku using the CLI with heroku login, use hello@udachef.com as email and the password stored in 1Password
  4. Create the Heroku app at https://dashboard.heroku.com/apps (if it doesn't exist already)
  5. Add the Heroku app as remote: heroku git:remote -a udachef-kitchen-service
  6. Run git push heroku master to push changes to Heroku, the console output will tell you when it is done
  7. When it is done, run heroku open to open up the page in the browser
  8. You can now to requests to https://udachef-kitchen-service.herokuapp.com/! :)

API

  • GET /kitchen - Fetch kitchen data
  • GET /search - Get a number of standard ads
  • GET /search:query - Search for ads by search query

mlab.com

The Mongo instance is running on mlabs.com free 500mb service. The login is stored in 1Password

Database: staging-kitchen
URI: mongodb://<dbuser>:<dbpassword>@ds149479.mlab.com:49479/staging-kitchen

Docker Pull Command
Owner
udachef
Source Repository

Comments (0)