Flask-node
Similar to python Flask web-framework
Install
You can use npm
or yarn
install the Flask-node
npm install flask-node --save
// or
yarn add flask-node --save
Usage
/** Typescript app.ts */; ;; router.add'/', indexHandle; app.run;
or
/** Javascript app.js */const Flask Router = ;const app = __dirname;const router = ; { res;}router; app;
// run appnode app.js // ==> Server is run on http://localhost:5051 // use curl test app.jscurl http://localhost:5051 // ==> Hello world
Features
- Support dynamic routing
- Support HTML template engine (use Swig)
- Natice support HTTP body parse (use formidable)
Documentation
Test
run npm test
Contribution
- fork this repo
- run
npm install
install dependencies - write your code and run
git cz
commit your code - run
npm test
and ensure that all tests pass - pull request , tks
License
MIT © Lleohao