Git Product home page Git Product logo

json-invoices's Introduction

A Code Challenge for parsing JSON

A lightweight app for parsing and invoice in JSON format and updating a database.

  1. Drag and drop a valid JSON invoice into the box.
  2. File is uploaded to the server, parsed recorded to the database and emitted on the socket
  3. All users receive real-time update

Tools

  • Angular (ES6)
  • Express
  • Socket.io
  • Webpack
  • Gulp
  • SASS

Dependencies

  1. Install the latest Node.js and NPM. This config is built with Node V6.2.0.
  2. Webpack npm install webpack -g and ensure it is available on your PATH
  3. Gulp npm install gulp -g and ensure it is available on your PATH

Setup

For development tools and building:

  1. Run yarn or npm install within the project root directory in Terminal.
  2. Change directory cd ./public and run yarn or npm install again for the client side dependencies.
  3. Back to project root cd ../
  4. Run npm start:dev to start the server.
  5. Run npm run build:watch to run webpack and watch for changes.
  6. Run npm test to run Karma tests and watch for changes.
  7. Run gulp build:watch to process our stylesheets. Webpack also sees there changes and modifies the bundle.

Structure

  • /public/components contains a sub-directory for each component, holding source JS and views.
  • /public/style contains a sub-directory for each style component, folder scss for the source styling and css for the compiled version.
  • /public/dist is the directory for webpack compiled JS and CSS
  • /routes API and models definition
  • /.config/.env stores global variables for the server
  • /.config/.db Database connection params

Scripts

Command Purpose
npm run clean Delete /public/dist/*.
npm run build Compile JS and CSS to /public/dist/bundle.
npm run build:watch Build, rebuilding on source file changes.
npm run start:dev Start the server, restarting on source file changes.
npm run start:prod Start the server using forever in production mode
npm run stop:prod Stop the production server
npm run restart:prod Restart the production server
npm start Start the server.
npm test Start Karma testing watching for file changes.

Developed by Jimmy Cann and licensed under MIT.

json-invoices's People

Contributors

jimmycann avatar

Watchers

 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.