/test-oxa

Primary LanguageJavaScript

ExpressJS - System badge and level

restfulapi



GETTING STARTED

Node.js Express.js JsonWebToken.js

is another application made by express.js, badge levels and application systems can only be checked once a day, if the check-in meets the requirements then the level will go up and if the level meets the badge requirements will go up or checkin users must first log in otherwise they will not be able to

software preparation needed

  • postman
  • web server (xampp)
  • text editor (visual studio code)
  • crome

add .env file

add the .env file to your project then copy the code below

NODE_ENV=development

 HOST_DB='localhost'
 USER_DB='root'
 PASSWORD_DB=''
 DATABASE_DB='game'

 ALGORTIHM = 'aes-256-ctr'
 PASSWORD_ALGORITHM = 'd6F3Efeq'

how to run this application

  1. git clone https://github.com/rionmingarfin/test-oxa.git
  2. open text editor
  3. run the web server and mysql application,example xampp
  4. import db game in phpmyadmin
  5. open terminal in CMD or terminal text editor(visual studio code)
  6. type npm install
  7. tambahkan .env
  8. type npm start
  9. open postman and run it with port 4000
note

note before adding the env first

endPoint LIST

1.badge
  • get('/')
  • post('/api/v1')
  • get('/api/v1')
  • patch('/api/v1/:id')
  • delete('/api/v1/:id')
2.level
  • `post('/api/v2')
  • `get('/api/v2')
  • `patch('/api/v2/:id')
  • `delete('/api/v2/:id')
3.user
  • `post('/api/v3')
  • `post('/api/v3/login')
  • `delete('/api/v3/:id')
4.level user/check_in
  • `get('/api/v4',)
  • `get('/api/v4/:id')
  • `patch('/api/v4')

Screenshot from the app