0.0.1 • Published 4 years ago

dedicate v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Dedicate

Note: This framework is still in development and not for production use.

A simple lightweight HTTP server framework developed by awyerbx (Trqckpady) and MasonTrv (Razod)

Setting Up

  • Download Dedicate
npm i dedicate
  • Create a server.js File
  • Create an index.html File
  • Write Your HTML Page
<h1>
  Hello Dedicate!
</h1>
  • Import dedicate in your server.js
const server = require('dedicate');
  • Add a home route
server.get('/', (req, res) => {
  res.sendFile('./index.html');
});
  • Create a listener
server.listen(3000, () => {
  console.log('Running on localhost:3000!');
});
  • Run your server.js file in a command line
node server
  • Go to localhost:3000 and view your site!

FULL CODE index.html

<h1>
  Hello Dedicate!
</h1>

server.js

const server = require('dedicate');

server.get('/', (req, res) => {
  res.sendFile('index.html');
});

server.listen(3000, () => {
  console.log('Running on localhost:3000!');
});

CHANGE LOG

0.0.1 - Initialization