/csv_file_read

Primary LanguageJavaScript

Note: Before run this app please make sure MongoDB server is running.

  1. Clone this repo and then open CMD and change directory to root folder and run 'npm install' to download dependencies.
  2. run 'node index.js' to start the node server
  3. after start server open postman or any other rest api test tool
  4. To read and save data in mongodb use below api
    URL: http://localhost:8080/api/readCsv
    METHOD: GET
  1. User Registration
    URL: http://localhost:8080/api/user/register
    METHOD: POST
    REQUEST:
        {
            "userid":"test",
            "password":"test"
        }
  1. User login
    URL: http://localhost:8080/api/user/login
    METHOD: POST
    REQUEST:{
            "userid":"test",
            "password":"test"
        }
  1. Fetch Records based on paginations
    URL: http://localhost:8080/api/fetchRows/:skip/:limit
    METHOD:GET
    REQUEST HEADERS:{
        authorization: "Bearer <Paste authorization token which you got after login>"
    }
  1. Fetch records with filters
    URL : http://localhost:8080/api/fetchRows/:skip/:limit?country=:country&&region=:region
    METHOD:GET
     REQUEST HEADERS:{
        authorization: "Bearer <Authorization token which you got after login>"
    }