import{ opine }from"https://deno.land/x/opine@2.1.1/mod.ts";const app =opine();
app.get("/",function(req, res){
res.send("Hello World");});
app.listen(3000,()=>console.log("server has started on http://localhost:3000 🚀"),);
Installation
This is a Deno module available to import direct from this
repo and via the Deno Registry.
And follow any suggestions to update your PATH environment variable.
Create the app:
opine-cli --view=ejs hello-deno &&cd hello-deno
Start your Opine app at http://localhost:3000/:
deno run --allow-net --allow-read --allow-env mod.ts
Philosophy
The Express philosophy is to provide
small, robust tooling for HTTP servers, making it a great solution for single
page applications, web sites, hybrids, or public HTTP APIs.
Opine will aim to achieve these same great goals, focussing on providing
equivalent robust tooling and features.
Once Deno's Node compatibility layer
matures sufficiently to support Express out of the box, Opine will be operate in
maintenance mode.
There are several third party modules that have been ported into this module.
Each third party module has maintained it's license and copyrights. The only
exception is for Express, from which this entire module has been ported, whose
license and copyrights are available at EXPRESS_LICENSE
in the root of this repository, and cover all files within the source
directory which not been explicitly licensed otherwise.
All modules adapted into this module are licensed under the MIT License.