mortezaexpress
v1.1.8
Published
It's a simple express writen by Mortreza
Downloads
69
Readme
MortezaExpress
MortezaExpress in a lightweight and simple framework for building web applications with node js.
Features
- Simple routing
- Strongly typed
- Serving static files
How To Install
Install this package using
npm install mortezaexpressUsage
Here's the examplw of using mortezaexpress:
const express=require('mortezaexpress')
const app=express()
app.get('/',(req,res,next)=>{
res.json({
message:'Hello World'
})
})
app.listen(8000,()=>{
console.log('app is running');
})Static Files
For serving static files you can use:
app.use("path")Middlewares
You can add middlewares using:
app.use((req,res,next)=>{
console.log('middleware');
next()
})