Git Product home page Git Product logo

hireupau-backend-assessment's Introduction

Documentation

Description

Generate invoices from provided test data.

Prerequisites

  • Node.js 8.x or above

Local Deployment

open a Terminal session
git clone https://github.com/codeg33k/hireupau-backend-assessment.git
cd hireupau-backend-assessment
npm i
npm start

Test Routes

  • Using curl
open a new Terminal session
curl http://localhost:3000/bookings
curl http://localhost:3000/invoices
curl http://localhost:3000/bookings/4
  • Using Postman
open Postman
GET http://localhost:3000/bookings
GET http://localhost:3000/invoices
GET http://localhost:3000/bookings/5
  • Using a web browser
Navigate to any of the following uri's:
http://localhost:3000/bookings
http://localhost:3000/invoices
http://localhost:3000/bookings/4

http://hireup.codegeeks.it/bookings
http://hireup.codegeeks.it/invoices
http://hireup.codegeeks.it/bookings/2

Notes

There are a number of things I would do differently given some time.

  • http status error handling using error handling middleware
  • unit tests with mocha or jest
  • add swagger API documentation
  • break up index.js into models, controllers, routes and utils as more routes are written
  • use persistent storage
  • implement model validation
  • setup docker deployment

Lessons learned:

  • Be more aware of float related errors and calculations in JavaScript
  • Parsing times into a usable format can be tricky without moment.js
  • Try not to over-engineer

hireupau-backend-assessment's People

Contributors

codeg33k avatar

Forkers

dennisxzx

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.