GithubHelp home page GithubHelp logo

phase-3-challenge's Introduction

phase-3-challenge

to install dependencies:

  npm install

Part 1: Calculations from URL

The part-1 folder contains a simple app to make calculations through URLs typed in a browser.

start the server with:

  npm start

example uses:

  URL: localhost:3000/zero
  renders: 0

  URL: localhost:3000/add?a=19&b=11
  renders: a + b = 30

  URL: localhost:3000/subtract?a=90&b=20
  renders a - b = 70

  URL: localhost:3000/double/49
  renders:49 times 2 is 98

Part 2: Database for grocery store & tests

The part-2 folder contains data and queries to set up a grocery store database with tables for items, orders, and shoppers:

With postgres, use the queries from schema.sql to set up the database and load-data.sql to load the data from groceries.csv into the items table and insert data on shoppers and orders into those respective tables.

The database.js file contains functions that return the result of pg-promise queries on the grocery_store database.

The test folder (which is outside of part-2) contains Mocha + Chai tests of some pg-promise functions that query the database. Type npm test in the Terminal to run them.

Part 3: Web Interface for grocery store

The part-3 folder contains HTML, CSS and JS files for a front-end only website where one can add grocery items into a cart that automatically sums the prices as items are added. Just open grocer.html in a browser to try it out.

phase-3-challenge's People

Contributors

smithrm941 avatar

Watchers

James Cloos 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.