Giter VIP home page Giter VIP logo

webfood2.0's Introduction

WebFood2.0

A redesigned front-end website for the Iowa State University online WebFood ordering system

Installation

These instructions work on Linux and should work on Windows or Mac.

To install, first make sure you have nodejs and npm installed. Additionally, python (version 2) is required to build some of the dependencies in the project.

Clone the repo, go into it's root folder, and have npm pull the dependencies for the project:

	npm install

Lastly, start the server:

	npm start
	# Or, for debugging mode (extra logging to the console):
	DEBUG=WebFood npm start
  # Optionally use a port other than 3000:
	PORT=9000 npm start

Then navigate to http://localhost:3000 (or whatever port was chosen)

API

Logging In

POST /auth/login

Attempts to login to the system and start a session.

Request Body: json with username and password fields: { "username": "<username>", "password": "<password>" }

Response Body (success): json object with user property, containing informatin about the user. Starts a session.

Registering

POST /auth/register

Attempt to register a user.

Request Body: json with a username and password field (see /auth/login route)

Response Body (error): If an error occurs, such as the user already exists, a 400 Bad Request response is sent back

Response Body (success): Sends back information about the newly registered user and logs them in

Placing an Order

POST /api/create-order

Create a new order

Request Body: { "location": "", "price": Number, "entree": "", "beverage": "", "sides": ["sides1", "side2"], "other": "..." } Response: { "_id": Number, "location": "", "price": Number, "entree": "", "beverage": "", "sides": ["sides1", "side2"], "other": "..." }

webfood2.0's People

Contributors

boddie avatar jhbertram avatar tyleru avatar vibeblind avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.