Skip to content

Ckal/logger-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logger-demo

A Basic Node.js/Express REST API implementation example for logging.

Prerequisites

  • Node.js
  • NPM

Usage

  • Run npm install to installl dependencies
  • Run npm start to start the local server
  • Load http://localhost:3000 to test the endpoint. It will display a json result {"message":"Ok"}

API Endpoints

POST /auth/signup

user signup

curl --header "Content-Type: application/json" \
 --request POST \
 --data '{"email":"yasas@gmail.com","password":"xyz"}' \
 http://localhost:3000/auth/signup

GET /api/users

Get a list of users -Not Authenticated

curl http://localhost:3000/api/users

Get a list of users - Authenticated

curl --header "Authorization: Bearer token" \
 --request GET \
 http://localhost:3000/api/users | json_pp

About

A demo logging for Node,js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%