@trenskow/app 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,22 +124,22 @@ import { Application, Endpoint } from '@trenskow/app';
|
|
|
124
124
|
const app = new Application({ port: 8080 });
|
|
125
125
|
|
|
126
126
|
try {
|
|
127
|
-
|
|
127
|
+
|
|
128
128
|
const root = new Endpoint()
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
.mount('iam', await import('./iam.js'));
|
|
130
|
+
|
|
131
131
|
const renderer = async ({ result, response }) => {
|
|
132
132
|
response.headers.contentType = 'text/plain';
|
|
133
133
|
response.end(result);
|
|
134
134
|
};
|
|
135
|
-
|
|
135
|
+
|
|
136
136
|
await app
|
|
137
137
|
.root(root)
|
|
138
138
|
.renderer(renderer)
|
|
139
139
|
.start();
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
console.info(`Application is running on port ${app.port}`)
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
} catch (error) {
|
|
144
144
|
console.error(error);
|
|
145
145
|
}
|