|
@@ -1,20 +1,20 @@
|
|
-/// <reference types="es4x" />
|
|
|
|
|
|
+/// <reference types="@vertx/core" />
|
|
// @ts-check
|
|
// @ts-check
|
|
|
|
|
|
import { Router } from '@vertx/web';
|
|
import { Router } from '@vertx/web';
|
|
|
|
|
|
import { PgPool } from '@vertx/pg-client';
|
|
import { PgPool } from '@vertx/pg-client';
|
|
import { PoolOptions } from '@vertx/sql-client/options';
|
|
import { PoolOptions } from '@vertx/sql-client/options';
|
|
-import { RockerTemplateEngine } from '@vertx/web-templ-rocker'
|
|
|
|
|
|
+import { JteTemplateEngine } from '@vertx/web-templ-jte'
|
|
import { PgConnectOptions } from '@vertx/pg-client/options';
|
|
import { PgConnectOptions } from '@vertx/pg-client/options';
|
|
import { Tuple } from '@vertx/sql-client';
|
|
import { Tuple } from '@vertx/sql-client';
|
|
|
|
|
|
const util = require('./util');
|
|
const util = require('./util');
|
|
|
|
|
|
-const SERVER = 'vertx.js';
|
|
|
|
|
|
+const SERVER = 'es4x';
|
|
|
|
|
|
const app = Router.router(vertx);
|
|
const app = Router.router(vertx);
|
|
-const template = RockerTemplateEngine.create();
|
|
|
|
|
|
+const template = JteTemplateEngine.create();
|
|
let date = new Date().toUTCString();
|
|
let date = new Date().toUTCString();
|
|
|
|
|
|
vertx.setPeriodic(1000, t => date = new Date().toUTCString());
|
|
vertx.setPeriodic(1000, t => date = new Date().toUTCString());
|
|
@@ -153,7 +153,7 @@ app.get("/fortunes").handler(ctx => {
|
|
});
|
|
});
|
|
|
|
|
|
// and now delegate to the engine to render it.
|
|
// and now delegate to the engine to render it.
|
|
- template.render({ fortunes: fortunes }, "Fortunes.rocker.html", res => {
|
|
|
|
|
|
+ template.render({ fortunes: fortunes }, "fortunes.jte", res => {
|
|
if (res.succeeded()) {
|
|
if (res.succeeded()) {
|
|
ctx.response()
|
|
ctx.response()
|
|
.putHeader("Server", SERVER)
|
|
.putHeader("Server", SERVER)
|