# ztwserver **Repository Path**: haowenw/ztwserver ## Basic Information - **Project Name**: ztwserver - **Description**: web server frame - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-19 - **Last Updated**: 2021-03-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README web framework for node.js ```js const zserver=require('ztwserver'); const app=new zserver(); app.use(async(ctx,next)=>{ ctx.body='hello world'; }); app.listen(3000); ``` ### Installation Before installing, download and install Node.js. Node.js 8.x or higher is required. ```shell npm install ztwserver ``` ### Middleware Instance of router middleware: ```js const zsesrver=require('ztwserver'); const Router=require('ztwserver-router'); const app=new zserver(); const router=new Router(); router.get('ztw.html',ctx=>{ ctx.body='...'; }) app.use(router.routes()); app.use(async(ctx,next)=>{ ctx.body='404 NOT FOUND'; }) app.listen(3000); ``` Recommended for now: - ztwserver-router - ztwserver-static