@ccci/micro-server 0.0.23 → 0.0.25
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/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78217,13 +78217,15 @@ class ApplicationServer {
|
|
|
78217
78217
|
app.use(helmet());
|
|
78218
78218
|
app.use(import_express.default.json());
|
|
78219
78219
|
app.use(import_express_fileupload.default());
|
|
78220
|
+
console.log("#### Creating DB Connection");
|
|
78220
78221
|
const db = new DatabaseConnector(path2);
|
|
78221
78222
|
const conn = await DatabaseConnector.init();
|
|
78222
78223
|
await db.connect(conn[0]);
|
|
78223
78224
|
await db.initializeModels();
|
|
78225
|
+
console.log("#### Connected");
|
|
78224
78226
|
new RouterFactory(app, path2, "routes");
|
|
78225
78227
|
app.listen(port, () => {
|
|
78226
|
-
console.log(`
|
|
78228
|
+
console.log(`API Sever ready at: http://127.0.0.1:${port}`);
|
|
78227
78229
|
});
|
|
78228
78230
|
}
|
|
78229
78231
|
}
|
|
@@ -78250,6 +78252,7 @@ class BaseRouter {
|
|
|
78250
78252
|
async get(req, res, next) {
|
|
78251
78253
|
let response;
|
|
78252
78254
|
try {
|
|
78255
|
+
console.log("GET :>> ");
|
|
78253
78256
|
response = await this.controller.find(req, res, next);
|
|
78254
78257
|
res.status(200).json(response);
|
|
78255
78258
|
} catch (error) {
|
|
@@ -78268,6 +78271,7 @@ class BaseRouter {
|
|
|
78268
78271
|
async post(req, res, next) {
|
|
78269
78272
|
let response;
|
|
78270
78273
|
try {
|
|
78274
|
+
console.log("POST :>> ");
|
|
78271
78275
|
response = await this.controller.create(req, res, next);
|
|
78272
78276
|
res.status(200).json(response);
|
|
78273
78277
|
} catch (error) {
|
|
@@ -78277,6 +78281,7 @@ class BaseRouter {
|
|
|
78277
78281
|
async getId(req, res, next) {
|
|
78278
78282
|
let response;
|
|
78279
78283
|
try {
|
|
78284
|
+
console.log("GET ID :>> ");
|
|
78280
78285
|
response = await this.controller.findById(req, res, next);
|
|
78281
78286
|
res.status(200).json(response);
|
|
78282
78287
|
} catch (error) {
|
|
@@ -78286,6 +78291,7 @@ class BaseRouter {
|
|
|
78286
78291
|
async update(req, res, next) {
|
|
78287
78292
|
let response;
|
|
78288
78293
|
try {
|
|
78294
|
+
console.log("UPDATE :>> ");
|
|
78289
78295
|
response = await this.controller.update(req, res, next);
|
|
78290
78296
|
res.status(200).json(response);
|
|
78291
78297
|
} catch (error) {
|