runlify 0.0.582 → 0.0.583
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.
|
@@ -5,9 +5,9 @@ var types_1 = require("../../../../../types");
|
|
|
5
5
|
var utils_1 = require("../../../../../utils");
|
|
6
6
|
var environmentIndexTmpl = function (options) {
|
|
7
7
|
if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
|
|
8
|
-
return "import
|
|
8
|
+
return "import log from './log';\nimport {createContext} from './adm/services/context';\nimport express from 'express';\nimport defaultContainer from './adm/services/defaultContainer';\nimport initEndpoints from './initEndpoints';\n".concat(options.skipWarningThisIsGenerated
|
|
9
9
|
? ''
|
|
10
|
-
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\
|
|
10
|
+
: "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst app = express();\n\nconst start = async () => {\n const ctx = await createContext(defaultContainer);\n const port = 3000;\n\n const production = process.env.NODE_ENV === 'production';\n log.info(`production: ${production}`);\n\n const endpoints = await initEndpoints(app, ctx, port, production);\n\n app.listen({port}, () => {\n log.info('\n' + endpoints.map(e => `\uD83D\uDE80 Server ready at ${e}`).join('\n'));\n });\n};\n\nstart().catch(error => {\n // eslint-disable-next-line no-console\n console.error(error);\n\n throw error;\n});\n");
|
|
11
11
|
};
|
|
12
12
|
exports.environmentIndexTmpl = environmentIndexTmpl;
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy9iYWNrL2Vudmlyb25tZW50L3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw4Q0FHNkI7QUFDN0IsOENBQXVEO0FBRWhELElBQU0sb0JBQW9CLEdBQUcsVUFDbEMsT0FBK0Q7SUFBL0Qsd0JBQUEsRUFBQSxVQUFrQyxxQ0FBNkI7SUFDNUQsT0FBQSwwT0FNSCxPQUFPLENBQUMsMEJBQTBCO1FBQ2hDLENBQUMsQ0FBQyxFQUFFO1FBQ0osQ0FBQyxDQUFDLGVBQ0Qsd0JBQWdCLE9BQ3BCLHNqQkF3QkE7QUFsQ0ksQ0FrQ0osQ0FBQTtBQXBDWSxRQUFBLG9CQUFvQix3QkFvQ2hDIn0=
|