Giter Site home page Giter Site logo

simple-html-server-in-node.js's Introduction

A Simple Web Server in Node.js

A very simple example of a web server for standalone HTML files made with Node.js and Express.

It can receive and handle POST requests and serve some dynamic data. On the client side, a few simple AJAX calls are used to handle asynchronous input and output requests. It's all very bare bones, and special emphasis is made to make the code easy to understand. Now just add your own features, and you have something presentable! :D

Note: This code is meant for educational purposes to showcase Node.js and Express, and it's not meant for production. However it can still serve as a starting point if you're ready to put in some additional work. My first suggestion would be to change the standalone HTML files for ones generated with either Pug (previously Jade), Hogan or EJS.

Installation

Download and extract the files. In the terminal, cd to the app directory (bin) and input:

npm install

Then view the files on http://127.0.0.1:1338

simple-html-server-in-node.js's People

Contributors

kebman avatar

Stargazers

 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.