1import {Fastee} from "fasteejs"
2
3 const app = new Fastee(); //uses defaults
4 const app1 = new Fastee({port:4000,delay:30000}) //pass port and shutdown delay
5 let server = http.createServer().listen(5000)
6 const app2 = new Fastee({server,delay:30000}) //passed listening server must be already running
7 app.get('/', function (req, res) {
8 res.text('Hello World')
9 })
10
11 app.static("static",{dotfiles:false}) //pass valid folder path and optional config
12
13 //shutdown listener
14 app.onShutdown((signal)=>{
15 //call service before shutdown
16 console.log("before",signal)
17 })
18
19 export {app,app1,app2}