{"_id":"@augmt/timestamp-microservice","_rev":"8-7712e632ece7d121535eaab87c8c2575","name":"@augmt/timestamp-microservice","time":{"modified":"2022-06-12T14:51:44.801Z","created":"2016-10-02T02:48:03.465Z","0.2.3":"2016-10-02T02:48:03.465Z","0.2.4":"2016-10-02T02:56:23.709Z","0.3.0":"2017-08-27T20:27:58.790Z","0.3.1":"2018-03-10T14:00:24.695Z"},"maintainers":[{"name":"augmt","email":"soseinhg3@gmail.com"}],"dist-tags":{"latest":"0.3.1"},"description":"Timestamp Microservice","readme":"# Timestamp Microservice\n\nConvert date strings to Unix timestamps and a natural language (RFC-1123)\nformat.\n\n## How it Works\n\nThis microservice uses [Moment][1] to validate input and format output and\n[koa-router][2] to capture path parameters and, along with [Koa][3], serve\nrequests.\n\n[1]: https://momentjs.com/\n[2]: https://github.com/alexmingoia/koa-router\n[3]: http://koajs.com/\n\n### Valid Formats\n\n| Format         | Example    |\n|----------------|------------|\n| Unix Timestamp | 1450137600 |\n| [ISO-8601][4]  | 2015-12-25 |\n\n_Note_: Unix timestamps have precedence over the ISO-8601 format, so a string\nsuch as \"20130208\" will be parsed as a unix timestamp.\n\n[4]: http://www.cl.cam.ac.uk/~mgk25/iso-time.html\n\n## How to Use\n\n`app.js` exports a Koa app. Koa apps have an [`app.listen()`][5] method that is\nidentical to Node's [http.Server.listen()][6].\n\nImport `app.js` and call `app.listen()` to start up the microservice.\n\n[5]: http://koajs.com/#app-listen-\n[6]: https://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback\n\n## API Resources\n\n### GET /\n\nReturns a `Timestamp` object based on the current time.\n\n#### REQUEST\n\n__Sample__: `https://timestamp-microservice.example.com/`\n\n#### RESPONSE\n\n__Status__: 200 - `application-json`\n\n__Response__:\n\n    {\n      \"unix\": 1498953600,\n      \"natural\": \"Sun, 02 Jul 2017 00:00:00 GMT\"\n    }\n\n### GET /:date\n\nReturns a `Timestamp` object based on `date`.\n\n#### REQUEST\n\n__Sample__: `https://timestamp-microservice.example.com/1450137600`\n\n#### RESPONSE\n\n__Status__: 200 - `application-json`\n\n__Response__:\n\n    {  \n      \"unix\": 1450137600,\n      \"natural\": \"Tue, 15 Dec 2015 00:00:00 GMT\"\n    }\n","versions":{"0.2.4":{"name":"@augmt/timestamp-microservice","version":"0.2.4","description":"Timestamp Microservice","license":"MIT","author":{"name":"Hector Garcia","email":"soseinhg3@gmail.com"},"main":"lib/app.js","repository":{"type":"git","url":"git+https://github.com/augmt/timestamp-microservice.git"},"scripts":{"build":"babel src -d lib","publish":"npm run build","test":"tape -r babel-register test/test.js"},"dependencies":{"koa":"2.0.0-alpha.7","koa-router":"7.0.1","moment":"2.14.1"},"devDependencies":{"babel-cli":"^6.16.0","babel-plugin-transform-es2015-modules-commonjs":"^6.16.0","babel-register":"^6.16.3","chai":"^3.5.0","supertest":"^2.0.0","tape":"^4.6.1"},"gitHead":"18f3182be9e0f76ee295667407274042eef36aa7","bugs":{"url":"https://github.com/augmt/timestamp-microservice/issues"},"homepage":"https://github.com/augmt/timestamp-microservice#readme","_id":"@augmt/timestamp-microservice@0.2.4","_shasum":"a2879790f2686841f13b643dce1c46951416b500","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"augmt","email":"soseinhg3@gmail.com"},"dist":{"shasum":"a2879790f2686841f13b643dce1c46951416b500","tarball":"https://registry.npmjs.org/@augmt/timestamp-microservice/-/timestamp-microservice-0.2.4.tgz","integrity":"sha512-PzP40grsnpNX4AtEcHfpemIjWUGrGnMXkG3YU9OFUAhSvGY+Spo7CmMzjFGeIC/U9OLlbw3ICN9FLspZaYXbzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFs5FZ9cHXjT5bjNjEZ9osJymm0xtFryc3oVmidEaZ9uAiArKIxNtGGhObpcx9k2GesrhIprTOmIxb1YPzzF6GK0oA=="}]},"maintainers":[{"name":"augmt","email":"soseinhg3@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/timestamp-microservice-0.2.4.tgz_1475376982341_0.8556017647497356"},"directories":{}},"0.3.0":{"name":"@augmt/timestamp-microservice","version":"0.3.0","description":"Timestamp Microservice","license":"MIT","author":{"name":"Hector Garcia","email":"soseinhg3@gmail.com"},"files":["app.js","date-formats.js","timestamp-factory.js"],"main":"app.js","repository":{"type":"git","url":"git+https://github.com/augmt/timestamp-microservice.git"},"scripts":{"test":"tape \"test/**/*.js\""},"dependencies":{"koa":"2.3.0","koa-router":"7.2.1","moment":"2.18.1"},"devDependencies":{"simple-mock":"^0.8.0","supertest":"^3.0.0","tape":"^4.8.0"},"gitHead":"f282dd5580f371348b80df0a43f7cedded7201f8","bugs":{"url":"https://github.com/augmt/timestamp-microservice/issues"},"homepage":"https://github.com/augmt/timestamp-microservice#readme","_id":"@augmt/timestamp-microservice@0.3.0","_npmVersion":"5.3.0","_nodeVersion":"8.2.0","_npmUser":{"name":"augmt","email":"soseinhg3@gmail.com"},"dist":{"integrity":"sha512-8uFOM/zLkgItRqnytskTJGWLyXxHwIeAbKoCIL71wvU+CBHocMiXBnzu5BppkKXKuU/VJn0d8Ii4e4CmsIzLZg==","shasum":"3d850f1ddfca14ef77ff88676420d98b50e3a782","tarball":"https://registry.npmjs.org/@augmt/timestamp-microservice/-/timestamp-microservice-0.3.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGQiGMk5d/HVTFQEpGwxdEw7JB+steNendKAlNnVwMCKAiEAlhp7nf/m9X+fKvcMKCIsj312QM9whYV4hnWzQu/YRnA="}]},"maintainers":[{"name":"augmt","email":"soseinhg3@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timestamp-microservice-0.3.0.tgz_1503865677938_0.8145594326779246"},"directories":{}},"0.3.1":{"name":"@augmt/timestamp-microservice","version":"0.3.1","description":"Timestamp Microservice","license":"MIT","author":{"name":"Hector Garcia","email":"soseinhg3@gmail.com"},"files":["app.js","date-formats.js","timestamp-factory.js"],"main":"app.js","repository":{"type":"git","url":"git+https://github.com/augmt/timestamp-microservice.git"},"scripts":{"test":"tape \"test/**/*.js\""},"dependencies":{"koa":"2.3.0","koa-router":"7.2.1","moment":"2.21.0"},"devDependencies":{"simple-mock":"^0.8.0","supertest":"^3.0.0","tape":"^4.8.0"},"gitHead":"2eb9cc01e217796403f842821b34921bcb40dc40","bugs":{"url":"https://github.com/augmt/timestamp-microservice/issues"},"homepage":"https://github.com/augmt/timestamp-microservice#readme","_id":"@augmt/timestamp-microservice@0.3.1","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"augmt","email":"soseinhg3@gmail.com"},"dist":{"integrity":"sha512-8bN+E5IwSjPmBU/QMtczciGe/N+KlrIjVlEoOdRVteGorQAhW3T60ERghncMW+0fRTh/y59QqseDfGvCQJM66w==","shasum":"4afcebc3bfb8ecf8c4fc37ff29d66b8550f55a66","tarball":"https://registry.npmjs.org/@augmt/timestamp-microservice/-/timestamp-microservice-0.3.1.tgz","fileCount":6,"unpackedSize":4836,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/3ez19GhEpCIaTuKwVoFqQAOTAfGhL18ScOAFpm1b/QIgPQYDahNmKwwlhAEcTpKr21PbOnc62ZX0NEThOebHUfs="}]},"maintainers":[{"name":"augmt","email":"soseinhg3@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timestamp-microservice_0.3.1_1520690424566_0.5393064297079955"},"_hasShrinkwrap":false}},"homepage":"https://github.com/augmt/timestamp-microservice#readme","repository":{"type":"git","url":"git+https://github.com/augmt/timestamp-microservice.git"},"author":{"name":"Hector Garcia","email":"soseinhg3@gmail.com"},"bugs":{"url":"https://github.com/augmt/timestamp-microservice/issues"},"license":"MIT","readmeFilename":"README.md"}