0.0.1 • Published 5 years ago
dedicate v0.0.1
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.jsFile - Create an
index.htmlFile - 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.jsfile 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
0.0.1
5 years ago