The project is a Node.js web API on TypeScript, css and ejs with a dashboard that should allow to :
- API side
- CRUD users
- Authenticate
- CRUD your own metrics (make use of an authorization middleware)
- Front side
- Home page
- Sign In / Sign Up / Sign Out
- Insert/update/delete metrics once logged in
- Retrieve the user’s metrics and display it in a graph
- Only access the user’s metrics, not the other ones
git clone https://github.com/sofianerahli/ProjectNodejs.git
npm install
Pre-populate the database with three users and their own metrics.
npm run populate
Tests allow to test connection with leveldb, server and functions of the project with mocha and chai.
npm run test
npm start
git clone https://github.com/sofianerahli/ProjectNodejs.git
npm install
npm run populate
npm run test
npm run build
npm start
You can then access the server through port 8083. Server is running on http://localhost:8083
Method | Route | Desciption |
---|---|---|
GET | / | Home |
GET | /userpage/metrics | Get metrics |
POST | /addmetrics | Add a metric |
GET | /signup | Signup Page |
GET | /userpage | Userpage |
GET | /logout | Logout |
POST | /sigunp | Add an user |
POST | /login | Log an user |
GET | /addmetrics | Page add metrics |
GET | /deletemetrics | Page delete a metric |
GET | /userpage/bringmetrics | Bring metrics of the user |
- RAHLI Sofiane
- COMPAORE Yvan
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details
-
We had problems with rights. Indeed, when we was making a "pull" of the project, we had an access problem on the project. we solved this problem with director's rights.
-
We used the leveldb storage for the first time. So, it was necessary to took time to adapt.
-
We had problems with Travis CI. Indeed, the markdown remained gray with an error while all the tests passed. There was a version problem in the .travis.yml file configuration. We solved this problem.
-
Folder test with unit tests.
-
Contributors.js file with the list of project's contributors.
-
Markdown Travis CI with .travis.yml file and continuous testing.
-
License.md file with the GNU General Public License v3.0.
-
Markdown Travis CI with .travis.yml file.