Giter VIP home page Giter VIP logo

node-experiment-10001's Introduction

Node Experiment #10001 Workflow Code Style License | GPL v3

An experimental webserver example that does not care about security at all but has **zero** dependencies.
Made with Node and Typescript.

How to run the project;

  1. Clone this project with git [email protected]:eowfenth/node-experiment-10001.git;
  2. Inside this project directory, install the packages with your favorite packager manager, i.e.: npm i;
  3. Run this project with ts-node server.ts, you can do it also by typing npx ts-node server.ts if you haven't ts-node installed globally;
  4. You can access localhost:8081/success at your browser for the success endpoint or any other endpoint for 404 endpoint.

What it does:

  • serve html with streams;
  • feature routes;
  • feature modular controllers;
  • could in theory handle querystring params and serve proper content;
  • have zero external dependencies;
  • make use of typescript, eslint and prettier;
  • follow tsdoc standard and conventional commits.

What it could be better for its purpose:

  • the static content could be in a external service;
  • path traversal may not be an issue but the solution could be more elegant, https://security.stackexchange.com/a/123723;
  • controllers could be using single function contract;
  • could be using https module instead of http;
  • could even better using http2 module instead;
  • aside from path traversal, it could handle security better such as proper header settings;
  • it removes HPP, but could have better validations when accepting querystring parameters;
  • could make use of promises instead of callbacks;
  • the styles of html are no final yet, it could be better.
  • could have continuous deployment;

node-experiment-10001's People

Contributors

eowfenth avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.