Welcome to ONE Record Sandbox!
This repository contains the code and instructions that will help you deploy your first ONE Record Server. Please follow the instructions in order to get the application running.
Before deploying the server, you will need to update the
config.js file with the following information:
'secretKey': 'somesecretkeyforJWTencryption' 'mongoUrl': 'mongodb://user:password@url:port/database', 'subscriptionSecret': 'yoursubscriptionsecret', 'url':'yourbaseurl', 'companyName': 'yourcompanyname', 'IATACargoAgentCode': 'numericvalue', 'cacheFor': 'numericvalueinseconds', 'serverOwnSecret': 'secretNeededToAccessInternalResources', 'keyForServerInformation': 'keyForAccessingServerInformationEndpoint'
|secretKey||This key will be used for JWT encryption|
|mongoUrl||URL to your MongoDB database. Instructions on how to setup quickly a MongoDB environment below|
|subscriptionSecret||In a subscriber - publisher scenario, this key needs to be sent when your server subscribes to another server's logistics objects. The publisher can
|url||Base URL of your server in the Internet of Logistics|
|companyName||Name of your company|
|IATACargoAgentCode||IATA Cargo Agent Code of your server|
|cacheFor||Amount of time in seconds for which the subscription information can be cached|
|serverOwnSecret||Secret needed to access internal endpoints|
|keyForServerInformation||Key needed in order to access serverInformation endpoint|
For testing the application locally, follow the next steps:
npm. Please refer to Node.js documentation in order to install the correct version for your operating system: https://nodejs.org/en/download/.
- Install the dependencies in the local
node_modulesfolder by running
- Run the server via
npm start. Your application should be available at http://localhost:5000.
Swagger API Documentation
ONE Record Server uses a MongoDB database. In order to setup quickly your own MongoDB environment, we suggest you to use a cloud database service such as mLab.
- To get started with mLab, you must first create your free mLab account. When that’s complete, you can add as many database subscriptions as you want.
- After you’ve created your account, add a new database subscription. Get started at no cost by creating a free Sandbox database.
- Create a database user and password and retrieve your connection info after logging into your account and navigating to the database’s home page:
- Add your database URL to
You can deploy the ONE Record server on the platform that you wish. We are providing you with simple steps to deploy the application on Heroku platform. You can find the complete instructions on how to deploy a
Node.js application on Heroku here.
- Create a free Heroku account.
- Download and install Heroku CLI.
- Login to Heroku via command line:
heroku login -i
- Checkout the Github repository
- Create an app on Heroku via
heroku create. The output of the command should look like:
Creating app... done, ⬢ fathomless-escarpment-49684 https://fathomless-escarpment-49684.herokuapp.com/ | https://git.heroku.com/fathomless-escarpment-49684.git
You can now visualize your app via your Heroku dashboard.
- Add your Heroku remote as a remote in your current repository via the following command:
heroku git:remote -a fathomless-escarpment-49684
- Push the code from the Github repository to newly created app:
git push heroku master.
- All set! Your server should be available at https://fathomless-escarpment-49684.herokuapp.com.
Logistics Objects Examples
Some examples of logistics objects can be found under
IATA ONE Record
You can find further information about ONE Record specifications here.