cookie-parser binding in ReasonML
let app = Express.express();
App.use(app, CookieParser.make());
App.listen(app, ~port=3000);
let app = Express.express ()
let _ = App.use app (CookieParser.make ())
let _ = App.listen app ~port:3000
npm install --save bs-cookie-parser bs-express
Add bs-cookier-parser and bs-express to bsconfig.json. For example:
{
...
"bs-dependencies": [
"bs-express",
"bs-cookie-parser"
]
}
In one terminal:
npm run start
In second terminal:
cd tests && ./test.sh
Testing relies on querying a the
example/Index.re
server and making sure the output matches thetests/reference.data
.