A demo of MongoDB and the MapReduce programming model on a dummy articles dataset.
The client was developed using React and create-react-app.
-
Install dependencies:
cd client/ npm install
-
Run the development HTTP server:
npm start
The server was developed using Node, Express and Mongoose.
-
Install Node dependencies:
cd api/ npm install
-
Populate the
articles
collection with 10k randomly generated articles:node data.js cd public/ ./download.sh
-
Run the development HTTP server:
node server.js
-
Use the HTTP endpoints:
curl http://localhost:3001/articles
curl --header "Content-Type: application/json" \ --request POST \ --data '{ "text": "hey there" }' \ http://localhost:3001/articles/5c32bb4e5e1adb436d8fa140/comments