This is a little node server with CRUD interface:
Install npm stuff npm i
Create a copy of env file: cp .env.example .env
and set your credentials. Eg:
PORT=5000
MONGOURL=mongodb://localhost/superblog
npm run dev
node server/server.js
- GET
/api/posts
all posts - POST
/api/posts
creates a post. The request body must contain the post itself. See model - DELETE
/api/posts:id
deletes a post by given id eg:/api/posts/5ad4ce741a411bc2cb787445
- PUT
/api/posts:id
updates a post by given id eg:/api/posts/5ad4ce741a411bc2cb787445
{
name: String,
content: String,
order: Number
}
- create a own theme and pass it around with props or the context
- when selecting a image in CreatePost, show a preview of the image
- read about refs
src/App.js:23
- fix PropTypes checking
src/Post.jsx:43
- search whole project for
TODO