guggyjs
v2.0.1
Published
a web server like express but way better
Downloads
179
Readme
web server
install
npm i guggyjs
in javascript code:
const app = require("guggyjs");
usage
app.get("/",(req,res,ext)=>{
res.send("/public/index.html"); // sends this file to the client, automatically determining content headers
});
api
all the same as core njs but adds 2 new features
res.sendFile() // sends this file to the client, automatically determining content headers
res.send() // sends this data to the client, automatically determining if json or plain text. no html because seriously why would you wanna store html in a string, you psychopath.
ext.rawdata // data recieved from post requests like forms and such
ext.data // parsed rawdata, dont use this...