Skip to content

node.js REST API service to MySQL & SOAP Live Departure Boards Web Service (OpenLDBWS)

Notifications You must be signed in to change notification settings

msklyarov/OpenLDBWS-MySQL-REST-MicroService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps to run the server:

  • npm i
  • npm start
  • Install MySQL server and create table with data and structure from sql/table.sql file

config.js defines accessToken, soap URL, route prefix, the server port, and MySQL configuration.

Default routes are:

http://localhost:8080/api/getArrivalBoard

Request: POST
Content-Type: application/json
Raw payload: {
    "numRows": 10,
    "crs":"LDS",
    "timeWindowInMins": 120
}

http://localhost:8080/api/getServiceDetails

Request: POST
Content-Type: application/json
Raw payload: {
    "numRows": 3,
    "crs":"LDS",
    "timeWindowInMins": 120,
    "serviceID": "lZ2ciXjR/Lq0Z8xI4O0E3A=="

}

http://localhost:8080/api/getArrivalBoardWithDB

Request: POST
Content-Type: application/json
Raw payload: {
    "firstName": "Darren",
    "lastName": "Marsden",
    "numRows": 10,
    "timeWindowInMins": 120
}

Request: POST
Content-Type: application/json
Raw payload: {
    "firstName": "John",
    "lastName": "Smith",
    "numRows": 10,
    "timeWindowInMins": 120
}
Request: POST
Content-Type: application/json
Raw payload: {
    "firstName": "Jane",
    "lastName": "Doe",
    "numRows": 10,
    "timeWindowInMins": 120
}

You can use: Advanced REST client to test requests:

https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

About

node.js REST API service to MySQL & SOAP Live Departure Boards Web Service (OpenLDBWS)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published