This project was bootstrapped with Create React App.
In this project, I've used react, and experimented a little with recently released react-hooks for building
this app.
Helper libraries were used as under -
- create-react-app for creating the framework template code.
- Moment.js for all date related calculations.
- Prettier as code formatter
- CSS Flexbox for styling the components.
A set of data from is placed in the project as a file named as events.json This data is also used to test the application.
- node
- npm
- GNU make (if running using makefile)
In the project directory, you can run:
There's a Makefile included in this project at the top of the repository. The Makefile is very simple and has a default target to install the npm dependencies and start the server in development mode.
There are additional targets as under which are self-explanatory.
make help
, make clean
, make install
, make production
and make run
.
The project can also be run using the package.json scripts.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
You will also see any lint errors in the console if running in the development mode.
The server is running at http://localhost:8080
Open the server http://localhost:8080/api to view the data.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
The static files under build folder can be served using server.js.
Tests are written for the alerting login using the unit test libraries Mocha and chai. The test implementation can be found under './tests/project/service/monitoring.service.test.js'
To run the tests execute the command below,
- Created push notification on alert generated.
- Create Socket API to constantly push the stream of events when data is available.
- Write the tests for client application.