An open API service indexing awesome lists of open source software.

https://github.com/ismaileub/simple-server-using-pure-node-js

A basic HTTP server built using only core Node.js modules no external frameworks. It reads data from a JSON file and serves it through RESTful routes. A great starting point to understand how servers work under the hood with Node.js.
https://github.com/ismaileub/simple-server-using-pure-node-js

json node-js server

Last synced: about 2 months ago
JSON representation

A basic HTTP server built using only core Node.js modules no external frameworks. It reads data from a JSON file and serves it through RESTful routes. A great starting point to understand how servers work under the hood with Node.js.

Awesome Lists containing this project

README

          

# Node.js API with File-Based Storage

This is a simple **CRUD API** server implemented with pure **Node.js**.
It stores data in a **JSON file** instead of a traditional database β€” perfect for small projects, prototyping, or learning Node.js fundamentals.

## πŸ”Ή Features πŸ”Ή

βœ… **Create** a new item
βœ… **Read** all items or a single item by its title
βœ… **Update** an item’s body by its title
βœ… **Delete** an item by its title
βœ… File-based persistence (JSON)
βœ… Pure Node.js (without Express or additional libraries)

## πŸ”Ή Installation πŸ”Ή

1. **Clone the repository:**

```bash
git clone https://github.com/ismaileub/simple-server-using-pure-node-js.git
cd simple-server-using-pure-node-js
```

## πŸ”Ή Starting the server πŸ”Ή

```bash
node server.js
```

The server will be up and running at [http://localhost:5000](http://localhost:5000).

## πŸ”Ή Express Version πŸ”Ή

If you want a similar server implemented with Express, check this repository:
[https://github.com/ismaileub/simple-server-using-express](https://github.com/ismaileub/simple-server-using-express)

βœ… **Happy coding!**