@narando/express-expose-current-year
v0.36.0
Published
A function to get the current year and render it in templating engine.
Downloads
24
Readme
@narando/express-expose-current-year
A function to get the current year and render it in templating engine.
Getting Started
You need to have nodejs
, npm
, express
installed.
$ npm install @narando/express-expose-current-year
Usage
Get the current year at your locales to render it in mustache:
// server.js
import exposeCurrentYear from "@narando/express-expose-current-year";
import express from "express";
const app = express();
app.use(exposeCurrentYear());
app.listen(HTTP_PORT, () => {});
<!-- Template.mustache -->
<footer>
© {{ currentYear }} XYZ GmbH
</footer>