Skip to content

This project demonstrates how to build a full-stack web application using only Node.js native modules. No frameworks, no external dependencies - just pure JavaScript and the power of Node.js built-in capabilities.

Notifications You must be signed in to change notification settings

luangrezende/one-file-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

One File App

Node.js JavaScript License Dependencies

A complete user management application in a single JavaScript file with no external dependencies.

Features

  • Zero dependencies - Uses only native Node.js modules
  • Single file - All code in app.js
  • JSON database - Simple persistence in users.json
  • Web interface - HTML, CSS and JavaScript included
  • REST API - Endpoints to manage users

Quick Start

git clone https://github.com/luangrezende/one-file-app.git
cd one-file-app
node app.js

Open http://localhost:3000 in your browser.

Project Structure

one-file-app/
├── app.js        # Complete application
├── users.json    # Database (created automatically)
└── README.md     # This file

What it does

  • Add users
  • List users
  • Delete users
  • Data validation
  • Responsive interface
  • Data persistence

API

  • GET / - Web interface
  • GET /api/users - List all users
  • POST /api/users - Add a new user
  • DELETE /api/users/:id - Delete a user

Tech Stack

  • Node.js (http, fs, path, url)
  • HTML5 + CSS3 + JavaScript
  • JSON for persistence

Deploy

Railway (Recommended)

  1. Push your code to GitHub
  2. Go to railway.app
  3. Connect your GitHub repo
  4. Deploy automatically!

About

This project demonstrates how to build a full-stack web application using only Node.js native modules. No frameworks, no external dependencies - just pure JavaScript and the power of Node.js built-in capabilities.

Topics

Resources

Stars

Watchers

Forks