This is a simple website boilerplate built using Deno and deployed using Deno Deploy.
Demo at simple-deno-website-boilerplate.onbrn.com.
This right here is vanilla TypeScript and JavaScript. It's very easy to update and maintain.
It's meant to have no extra dependencies, builders, packagers, bundlers, or pre/post-processors. Just vanilla stuff.
It does include some examples for building complex apps, like:
- No JS form submission in
/form - Dynamic client-side updates in
/dynamicwith vanilla JS - Hydration in
/ssr(when some JS is dynamically created to update the client state once it's finished the initial load) with vanilla JS - Using Just-In-Time-transpiled-TypeScript (inspired by ts-serve) Web Components for dynamic client-side updates in
/web-component(it doesn't work on Safari) - Using Just-In-Time-transpiled-SASS for
SCSS→CSSoutput - React with SSR and hydration (and no build step) in
/react(and/react/5, for example) - Also, if you want to see things like Google Sign-in or GitHub Sign-in, running PostgreSQL database migrations, filling PDFs, sending emails with attachments, dynamic sitemaps, or uploading files to AWS S3, I've also published a Deno Code Examples repo.
You can build pretty complex and complicated things without frameworks or loads of dependencies, but if you need a framework, I'd suggest you try fresh to still be able to enjoy a lot of Deno. It's pretty nice.
This was tested with deno's version stated in the .dvmrc file, though it's possible other versions might work.
There are no other dependencies. Deno!
$ make start
$ make format
$ make test- Backend routes are defined at
routes.ts. - Static files are defined at
public/. - Pages are defined at
pages/.
Everything else can be structured differently.
- Deno Deploy: Just push to the
mainbranch. Any other branch will create a preview deployment.
Here are some things you will likely want to change before "publishing" this, or after cloning it:
-
baseUrl,defaultTitle,defaultDescription, andcontent-security-policyinlib/utils.ts - Title, description, and links in this
README.mdfile -
robots.txtandsitemap.xmlfiles