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.
- You should have finished the tasks " React-1: Create a react application and upload to GitHub" before this task.
- Initialize a Node.js project with the express framework.
- 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
- Commit the code, and push this code to your GitHub Repository
- Create a new branch in your local codebase (git checkout -b )
- 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
- 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
- Install PostMan(https://www.getpostman.com/) in your environment.
- Start your server program, and call the created endpoint (i.e:
localhost:3000/info
). Take the screenshot of the response. - 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
- What is Express framework?
- What is the usage of PostMan?
- Upload your screenshot here, and comment your PR link
More References
Task tags
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