Skip to content
NodeJS Web framework
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
src
.gitignore
readme.md

readme.md

Node WebServer

NodeJS web framework for learning purpose, somehow inspired by Express

Dependencies

The least possible, for now : none

Getting started

From src folder :

node main.js

Then in your browser : http://localhost:1234/

What's what

  • public/ contains all statics files exposed throw the static middleware
  • src/ contains everything else
    • nws "framework" source (for now)
    • routes contains modules that could be executed if a route match the requested url
    • shared routes, config...
    • views Templates

Route definition

module.exports = {
	"/some/route":{
		"get":"index.index"
	}
};

When the http://localhost:1234/some/route url is called through a GET request, then the module routes/index is required and the index method of that module is executed with the request and response parameters

If no route matches, the app sends back a 404 response

Todo

  • WIP - Keep things simple
  • Running server
  • Middleware architecture implementation
  • Static file middleware
  • Templating - server implementation of Template
    • Template Abastraction
    • Server implementation
    • WIP - Client implementation
  • Debugger - Similar to the one from php-fw Based upon browser's console
  • Dynamic url parameters (/some/route/{$with}/{$parameters})
  • HTTP Cache middleware
  • WIP - Frontend components support - JS Implementation of Dependencies
  • Form component (shared between frontend and backend)
  • Performance audit
  • Databases handler
  • Authentication middleware
  • Stabilize working tree
You can’t perform that action at this time.