DEV Community

Victor Osaikhuiwuomwan
Victor Osaikhuiwuomwan

Posted on

My First RESTful API: A Beginner's Journey

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

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 for cat facts.
  3. Debugging: Fixed SyntaxError: Unexpected token '(' and Git branch mismatch (master vs main).
  4. Testing: Tested with curl http://localhost:3000/me.
  5. GitHub: Added .gitignore, README.md, and pushed to main branch.
  6. Deployment: Deployed on Railway.
  7. Documentation: Fixed missing README.md issue and wrote this post.

Challenges and Lessons

  • Challenge: Git branch mismatch (master vs main).
  • Lesson: Align local and remote branches with git branch -m.
  • Challenge: Missing README.md in GitHub.
  • Lesson: Verify commits and pushes to the correct branch.

Try It Out!

Screenshots

Server Running
API Response

What’s Next?

I want to explore databases or more endpoints. Tips?

Top comments (1)

Collapse
 
lucasbrdt268 profile image
lucas-brdt268 • Edited

Hello. Wonderful article!
I think you are a funny developer. I want to keep to touch with you continuously.

This is my whatsapp.
+1 (279) 262-5585

Have a good day.