My First RESTful API: A Beginner’s Journey



This content originally appeared on DEV Community and was authored by Victor Osaikhuiwuomwan

On October 20, 2025, I built my first RESTful API with Node.js and Express. Here’s my journey as a beginner!

The Task

Create a GET /me endpoint with:

  • Profile: victorosaikh@gmail.com, Victor Osaikhuiwuomwan, Node.js/Express
  • Dynamic UTC timestamp
  • Random cat fact from https://catfact.ninja/fact

My Process

  1. Setup: Installed Node.js, VS Code, and ran npm init -y.
  2. Coding: Built an Express server with Axios.
  3. Debugging: Fixed SyntaxError: Unexpected token '(' and Git error pathspec 'README.md'.
  4. Testing: Tested with postman http://localhost:3000/me.
  5. GitHub: Added .gitignore and README.md, pushed to GitHub.
  6. Deployment: Deployed on Railway.
  7. Documentation: Updated README.md in VS Code and wrote this post.

Challenges and Lessons

  • Challenge: Git error pathspec 'README.md' did not match any files.
  • Lesson: Use pwd and dir to verify directory and files.
  • Challenge: Syntax error in code.
  • Lesson: Objects use key: value pairs.

Try It Out!

Screenshots

Server Running
API Response

What’s Next?

I want to explore databases or more endpoints. Tips?


This content originally appeared on DEV Community and was authored by Victor Osaikhuiwuomwan