OpenMRS

React-2: Create a server using Node.js to communicate with React App

This will be a set of tasks to develop a minimalized Node.js server.

  1. You should have finished the tasks " React-1: Create a react application and upload to GitHub" before this task.
  2. Initialize a Node.js project with the express framework.
  3. Change the content of the package.json with your preferences as follows
    • name: give a fantastic name :-)
    • version : 0.1.0
    • description: Give a one-line description
    • repository: Your repository URL
  4. Commit the code, and push this code to your GitHub Repository
  5. Create a new branch in your local codebase (git checkout -b )
  6. Change these contents in your local codebase
    • Create a '/info' endpoint in the codebase which needs to return the server name and server version as an JSON. (i.e: { serverName: 'sampleName', serverVersion: '0.1.0' }. You should fetch this information from your package.json
  7. Install PostMan(https://www.getpostman.com/) in your environment.
  8. Start your server program, and call the created endpoint (i.e: localhost:3000/info). Take the screenshot of the response.
  9. Commit and create a PR from the newly created branch to your master branch.

Before making a commit

  • commit message should be: [GCI-<your-gci-id>] message, Otherwise we will not accept your task.

Submission Steps

  1. What is Express framework?
  2. What is the usage of PostMan?
  3. Upload your screenshot here, and comment your PR link

More References

  1. https://dev.to/miku86/nodejs-how-to-create-a-simple-server-using-express-1n9d

Task tags

  • react
  • node.js
  • development
  • server

Students who completed this task

Michelle, GICMan, ajey muthiah, Snigdho, prathamesh_m009, pl9870, ShobhitRathi_, Saad Khaleeq, riskycase, Ishaanndas, PermissionError, Ribhav Sharma, lukasz-zbrzeski, wit03, Goutam, gamer-1748, mihiraggarwal, Devanshk09, Nayan, tixpro, chinemerem

Task type

  • code Code
close

2019