From 5104959da5ff24c5e6d5017e48f105aa54d40724 Mon Sep 17 00:00:00 2001 From: Dm1tr1y147 Date: Sun, 15 Nov 2020 12:08:51 +0500 Subject: [PATCH] Some linting fixes and example improvements --- .eslintignore | 4 +++- README.md | 5 +++++ example/index.js | 10 ++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 example/index.js diff --git a/.eslintignore b/.eslintignore index 46f1072..286e55b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,4 @@ lib/ -node_modules/ \ No newline at end of file +node_modules/ +example/ +rollup.config.js \ No newline at end of file diff --git a/README.md b/README.md index cadc919..a45c1b2 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,13 @@ npm install @dm1sh/eserver ```typescript import eServer from "@dm1sh/eserver" +import cors from "cors" const app = new eServer() +app.use(cors()) + +app.route("/", (req, res) => res.send("Welcome home")) + app.listen(5000) ``` diff --git a/example/index.js b/example/index.js new file mode 100644 index 0000000..1cd3ec7 --- /dev/null +++ b/example/index.js @@ -0,0 +1,10 @@ +const eServer = require("@dm1sh/eserver") +// import cors from "cors" + +const app = new eServer() + +// app.use(cors()) + +app.route("/", (req, res) => res.send("Welcome home")) + +app.listen(5000)