docker docker-compose
make build
make run
curl -X POST -H "Content-Type: application/json" \
-d '{"key": "1", "title": "my title", "body": "my body"}' \
http://localhost:8080/text
key=1
curl -X GET http://localhost:8080/text/$key
curl -X GET http://localhost:8080/search?q=my%20title
OR
curl -X GET -G --data-urlencode "q=my title" http://localhost:8080/search
make run-dev
Make sure MongoDB is running locally at 27017
curl -X POST -H "Content-Type: application/json" \
-d '{"key": "1", "title": "my title", "body": "my body"}' \
http://localhost:5000/text
key=1
curl -X GET http://localhost:5000/text/$key
curl -X GET http://localhost:5000/search?q=my%20title
OR
curl -X GET -G --data-urlencode "q=my title" http://localhost:5000/search
make help