https://github.com/rsachdeva/nodedx-blog-api
REST API for posts and nested comments with node express
https://github.com/rsachdeva/nodedx-blog-api
es6-import expressjs javascript nodejs promises
Last synced: 6 months ago
JSON representation
REST API for posts and nested comments with node express
- Host: GitHub
- URL: https://github.com/rsachdeva/nodedx-blog-api
- Owner: rsachdeva
- Created: 2018-02-23T05:35:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-23T05:45:41.000Z (almost 8 years ago)
- Last Synced: 2025-07-07T19:24:54.767Z (7 months ago)
- Topics: es6-import, expressjs, javascript, nodejs, promises
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Server
To install and start the API server, run the following commands in the root directory:
* `npm install`
* `npm start`
## ES6+ Style code
Uses babel so in code import and export es6+ style could be used.
### Use curl to CRUD at endpoints
From project root:
cd client_script
sh ./request.sh
new.json file is for a new blog entry in a separate file so can take large blogs.
new_comment.json is a for a new nested comment entry in a post as an example.
# Posts async handling
This is just to show Promise use in case this involved asynchronous handling.
For the current context, it could be done in synchronous way. Comments are kept synchronous.