Timestamp Microservice made in node for freeCodeCamp
Live version, needs time to boot up.
Based on Micro http microservice server and deployed on Now.
Internally Moment.js is used to parse query pathname url and return a json object with unix-timestamp and a natural representation of date.
Supports parsing from Moment.js.
On build will public
folder contain bunldled index.js
ready to be
served.
Example Usages:
https://timestamp-node-rpbinkoiwf.now.sh/December%2015,%202015
https://timestamp-node-rpbinkoiwf.now.sh/1450137600
https://timestamp-node-rpbinkoiwf.now.sh/
Example Output:
{
"unix": "1450137600000",
"natural": "Tuesday, December 15, 2015 12:00 AM"
}
Yarn or Npm can be used to run the commands.
yarn dev
to start micro-dev for development.
yarn format
to format code using prettier
yarn build
to build for production with output in public directory.
yarn start
to serve public directory via micro.
Latest Node.js LTS is required.
Husky and lint-staged are used to keep code consistent.