@startjs/start.js
v1.0.2
Published
**Start.js** was built for developers who are tired of heavy, bloated frameworks. It’s a minimal, high-performance routing engine designed to get you from `npm init` to a running server in seconds. No complex dependencies, no massive `node_modules` folder
Readme
Start.js
A lightweight, zero-dependency web engine for the modern dev.
Start.js was built for developers who are tired of heavy, bloated frameworks. It’s a minimal, high-performance routing engine designed to get you from npm init to a running server in seconds. No complex dependencies, no massive node_modules folder—just clean, readable code.
Why Start.js?
- Zero Bloat: 100% native Node.js. Your project stays lean and fast.
- Intuitive Routing: Capture variables instantly with
:paramsyntax. - Aesthetic by Default: Built-in terminal logging that actually looks good.
- Modular Architecture: Use the
Routerclass to split your app into organized, manageable files. - Smart Static Serving: Automatically detects MIME types for HTML, CSS, JS, and images.
Installation
npm install @startjs/start.jsThe 60-Second Setup
Building a server shouldn't be a chore. Here is how you "start":
const { start, Router } = require('@startjs/start.js');
const app = start();
// 1. Serve your front-end (HTML, CSS, etc.)
app.use(app.static('public'));
// 2. Add some middleware logic
app.use((req, res, next) => {
// Every request is logged automatically with Start.js styling!
next();
});
// 3. Create dynamic routes
app.get('/profile/:username', (req, res) => {
res.json({
user: req.params.username,
status: "Online"
});
});
// 4. Launch!
app.listen(3000, () => {
// You'll see the ✔️ [start.js] initialized log in your terminal!
});Advanced Features
Modular Routing (Route Groups)
Keep your code clean by grouping related routes together.
const api = Router();
api.get('/v1/status', (req, res) => res.json({ uptime: true }));
api.post('/v1/data', (req, res) => { /* Handle logic */ });
app.use('/api', api);Automatic JSON Handling
No need to manually set headers for every response. Just use res.json() and the engine handles the rest.
Terminal Experience
We believe the developer experience starts in the terminal. Start.js features a clean, color-coded logging system that keeps you informed without cluttering your screen:
✔️ [start.js] initialized.
🚀 server running at http://localhost:3000
→ [request] GET /index.html
→ [request] GET /api/statusLicense
Released under the ISC License. Feel free to use it, fork it, and build something great.
Let's build something.
Created by the @startjs community.
