This service accepts a string as a parameter and will check whether it is either a human readable date or a Unix timestamp. If it is, it will return both the Unix timestamp and the natural language form of that date as a JSON object. If it is neither, it returns 'null' for those properties.
You can test it at https://timestamp-micro-srvc.herokuapp.com
A Full Stack Javascript application built using NodeJS and Express. An API Project for FreeCodeCamp.
You can access the API directly through a browser or through a get ajax request.
https://timestamp-micro-srvc.herokuapp.com/December 15, 2015
https://timestamp-micro-srvc.herokuapp.com/1450137600
{
"unix": 1450137600,
"natural": "December 15, 2015"
}
- Fork this repo
- Clone the fork
- Install Dependencies:
$ npm install
- Start the Server:
$ node app.js
- Visit http://localhost:3000/