Node and Express powered Timestamp Microservice. Go to an API endpoint and get a unix and UTC timestamp that corresponds with the endpoint. Invalid dates return an error. This is a project I completed as part of the Back End Development and APIs certification from freeCodeCamp.
Check out the timestamp microservice ⏰
This is the homepage. The two links under usage are the API endpoints you can hit and edit as you wish.
Here we're hitting an API endpoint. Take note of the URL after /api/
. That's a millisecond timestamp. You can change the timestamp to a date such as 1984-02-12, or adjust the milliseconds.
Git, Node.js and NPM are required to run this project. Install Git by following this. If you don't have Node and NPM installed please follow these instructions.
- Click the green code button:
-
From there, click the button to the right of the URL under HTTPS. This will copy the URL of the repository.
-
Then open your terminal or command line. If you haven't used the command line before learn how to here.
-
If you've got a folder where you keep projects, change directories into that folder. After that type this command:
git clone https://github.com/AlexVCS/Timestamp-Microservice.git
This clones the repository to your local machine. It has a root directory called Timestamp-Microservice
to store all the files.
- Change directories into that folder:
cd Timestamp-Microservice
After that you can open the project in your text editor of choice. I use Visual Studio Code and launch it from the command line. Learn how here.
- Once you have the project open, you need to install the dependencies. Run this in your command line from the root (mad-libzz folder) of the project:
npm install
- After that finishes, run this to start the project:
npm start
- Head to your browser and type this into the address bar to run the project:
localhost:3000
- Node
- Express