DEV Community

loading...

Drash Middleware v0.6.0 Release Notes

drash_land profile image Drash Land ・Updated on ・2 min read

Drash Middleware v0.6.0 was released! This release comes with two new tools for your Drash application. Here's what we've added:

Front-end TypeScript Support

Want to write your front-end using TypeScript? Now you can with ServeTypeScript!

ServeTypeScript is middleware that allows you to write front-end TypeScript. How does it work? Here's the workflow:

  1. You give this middleware TypeScript files to compile when your Drash application starts up.
  2. When your application is starting up, the middleware compiles the files into JavaScript and saves the JavaScript in memory -- ready to be used when your application is running.
  3. When a request is made to a TypeScript file from your front-end, the middleware sends back the compiled JavaScript -- allowing your browser to execute it.

Since the TypeScript files are compiled and cached when your application starts up, your application stays quick to respond to requests.

Want to scale your front-end using TypeScript with a single tool? Check out the ServeTypeScript tutorial.

Improved Templating System Support

Want to power your Drash application with the template engine of your choice? Now you can with Tengine!

Tengine is middleware that allows you to tell your Drash application how it should render HTML; and you can use the template engine of YOUR choice. This means you can use it with Eta, Dinja, dejs, or any other Deno template engine framework that you love.

Don't have a template engine in mind to use? That's okay too! Tengine comes with a default template engine called Jae and getting started with it is super easy. At Drash Land, we're very documentation-driven, so we've written some tutorials for you to get started quickly.

Want to render HTML in an easy, scalable fashion? Check out the Tengine tutorials.

Cookie Support For CSRF

Protect your application with this middleware. Learn more about Drash's CSRF middleware here.


View the Drash Middleware project here.

More information on this release can be found at https://github.com/drashland/deno-drash-middleware/releases/tag/v0.6.0

Want to contribute to the Drash Land projects? View our "Good First Issues" here.

Discussion

pic
Editor guide
Collapse
shadowtime2000 profile image
shadowtime2000

Yahoo they added support for other template engines!