Demo RESTfull API built with ExpressJS, MariaDB & MongoDB.
- Node.js 16
- NPM Libraries
- Nodemon for Debugging and keeping track of changed files
- Express for initiating the server
- Mongoose for interracting with MongoDB
- BodyParser to parse request body
- MySQL for interracting with MariDB
- MongoDB 4.0 (Docker container recommended)
- MariaDB 10.3 (Docker container recommended)
docker compose -f "docker-compose.yml" up -d --build
nodemon server.js
OR
npm start run
Open adminer & create posts
table in db_demo
database. You can find the schema in ./resources/posts.sql
curl -X POST \
http://localhost:3000/posts \
-H 'Accept: */*' \
-H 'Accept-Encoding: *' \
-H 'Content-Type: application/json' \
-H 'Host: localhost:3000' \
-d '{
"title" : "Post Title",
"content" : "Post content goes here."
}'