{"id":18790627,"url":"https://github.com/gahbr/timestamp-microservice","last_synced_at":"2025-06-30T02:05:08.850Z","repository":{"id":58243710,"uuid":"530745249","full_name":"Gahbr/Timestamp-Microservice","owner":"Gahbr","description":"A Nodejs Microservice that is able to convert between Unix time and Human readable time.","archived":false,"fork":false,"pushed_at":"2022-09-02T17:40:51.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T13:56:32.591Z","etag":null,"topics":["backend","freecodecamp","freecodecamp-challenge","microservice","node","nodejs","unixtimeconverter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gahbr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-30T16:44:26.000Z","updated_at":"2022-08-30T18:16:58.000Z","dependencies_parsed_at":"2023-01-17T18:25:19.570Z","dependency_job_id":null,"html_url":"https://github.com/Gahbr/Timestamp-Microservice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gahbr/Timestamp-Microservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gahbr%2FTimestamp-Microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gahbr%2FTimestamp-Microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gahbr%2FTimestamp-Microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gahbr%2FTimestamp-Microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gahbr","download_url":"https://codeload.github.com/Gahbr/Timestamp-Microservice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gahbr%2FTimestamp-Microservice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262697250,"owners_count":23349890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","freecodecamp","freecodecamp-challenge","microservice","node","nodejs","unixtimeconverter"],"created_at":"2024-11-07T21:13:04.486Z","updated_at":"2025-06-30T02:05:08.237Z","avatar_url":"https://github.com/Gahbr.png","language":"JavaScript","readme":"\n\u003ch4 align=\"center\"\u003e \n\t Status: Finished\n\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n \u003ca href=\"#about\"\u003eAbout\u003c/a\u003e •\n \u003ca href=\"#layout\"\u003eLayout\u003c/a\u003e • \n \u003ca href=\"#how-it-works\"\u003eHow it works\u003c/a\u003e • \n \u003ca href=\"#tech-stack\"\u003eTech Stack\u003c/a\u003e \n\u003c/p\u003e\n\n\n## About\nA Nodejs Microservice that is able to convert between Unix time and Human readable time. This project was proposed as a challenge in freecodecamp's \"Back End Development and APIs\" course.\n\n---\n\n\n## Layout\n![timestamp](https://user-images.githubusercontent.com/80289718/187510478-13395d8d-bb02-4864-aa38-161b2df66d08.png)\n\n\n---\n\n## User Stories\n\n    * The API endpoint is GET [project_url]/api/timestamp/:date_string\n    \n    * A date string is valid if can be successfully parsed by new Date(date_string).\n    \n    * Note that the unix timestamp needs to be an integer (not a string) specifying milliseconds.\n    \n    * If the date string is empty it should be equivalent to trigger new Date(), i.e. the service uses the current timestamp.\n    \n    * If the date string is valid the api returns a JSON having the structure\n      {\"unix\": \u003cdate.getTime()\u003e, \"utc\" : \u003cdate.toUTCString()\u003e }\n      e.g. {\"unix\": 1479663089000 ,\"utc\": \"Sun, 20 Nov 2016 17:31:29 GMT\"}\n    \n    * If the date string is invalid the api returns a JSON having the structure\n    {\"error\" : \"Invalid Date\" }.\n\n\n---\n### Pre-requisites\n\nBefore you begin, you will need to have the following tools installed on your machine:\n[Git] (https://git-scm.com), [Node.js] (https://nodejs.org/en/).\nIn addition, it is good to have an editor to work with the code like [VSCode] (https://code.visualstudio.com/)\n\n#### Running the application (server)\n\n```bash\n# Clone this repository\n$ git clone https://github.com/Gahbr/Timestamp-Microservice\n# Access the project folder cmd/terminal\n$ cd Timestamp-Microservice\n# install the dependencies\n$ npm install\n# Run the application in development mode\n$ npm run dev\n# The server will start at port: 5000 - go to http://localhost:5000\n```\n\n---\n\n## Tech Stack\n\nThe following tools were used in the construction of the project:\n\n\n\u003e See the file  [package.json](https://github.com/Gahbr/Timestamp-Microservice/blob/main/package.json)\n#### [](https://github.com/Gahbr/Timestamp-Microservice)**Server**  ([NodeJS](https://nodejs.org/en/)  +  [HTML/CSS](https://pt.wikipedia.org/wiki/HTML))\n    \n-   **[Nodejs](https://nodejs.org/)**\n-   **[Express](https://expressjs.com/)**\n-   **[CORS](https://expressjs.com/en/resources/middleware/cors.html)**\n-   **[dotENV](https://github.com/motdotla/dotenv)**\n\n---\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgahbr%2Ftimestamp-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgahbr%2Ftimestamp-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgahbr%2Ftimestamp-microservice/lists"}