This project consists of a backend API built with Node.js and Express along with a frontend application developed using Vue.js. The purpose is to display a list of companies, their latest share prices, and historic price data.
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/tomgrant/companies-share-prices.git cd share-price-api
-
Install dependencies:
npm install
-
Run the application:
npm start
-
Run the Front end:
cd .\frontend\ npm install npm run build npm run serve
After starting the server, it will be running at http://localhost:8080
. You can access the API endpoints using a web browser or Postman.
The front end will be available at http://localhost:8081
Currently, the API provides the following endpoints:
GET /api/companies
: Returns a list of all the companies with data such as id, name, symbols score and more.GET /api/companies?includePrices=true
: Returns the same as above with the addition of all the historic prices of each companyGET /api/companies?includePrices=true&startDate=2020-04-01&endDate=2023-04-30
Returns the same as within a set date range, both start and end are optional.