Giter Site home page Giter Site logo

stock-exchange-express-api's Introduction

stock-exchange-express-api is a sample Node.js application which simulates the purchase of stocks.

The Back Story

I worked on the stock-exchange-api for a coding assessment. This was done in Java / Spring Boot, and I made this project to reimplement it in node.js to get some hands-on experience.

Notable Things Learned

  • Relative paths suck when importing modules. This plugin was useful to define directory aliases that can be used when importing stuff: babel-plugin-module-resolver. See the module-resolver plugin in .babelrc for configuration details.
  • This was my first experience with sequelize. I'm particular with how I organize my projects, so I liked how I can customize paths for Important Sequelize Things. See: .sequelizerc.

How Do I Run It?

Prerequisites

  • A relatively recent version of node.js and npm. I used node v12.2.0 and npm v6.9.0.

Running It

  1. Open a command prompt or terminal window.
  2. Clone this repo.
  3. Navigate to the stock-exchange-api root directory.
  4. npm install
  5. npm test to run the test suite.
  6. npm start to run the server, which runs on port 3000 by default.

You can use this Postman collection to interact with the API: stock-exchange-express-api.postman_collection.json

Details

This application uses sqlite. Database files are stored in a data directory, so they will survive app restarts.

Credits

This application uses a library, iex-api, to fetch stock information from a free public API by IEX Trading.

stock-exchange-express-api's People

Contributors

joshuapaulallen 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.