Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
nodejs-loopback: upgrade/add application dependencies
Browse files Browse the repository at this point in the history
To develop the application independent of the base image, we need to set up
dependencies in application's package.json file.
  • Loading branch information
raymondfeng committed Nov 15, 2019
1 parent 0682b5c commit 509ef01
Show file tree
Hide file tree
Showing 8 changed files with 2,780 additions and 945 deletions.
1,251 changes: 489 additions & 762 deletions incubator/nodejs-loopback/image/project/package-lock.json

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions incubator/nodejs-loopback/image/project/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-loopback",
"version": "0.1.6",
"version": "0.1.7",
"description": "Node.js LoopBack 4 Stack",
"license": "Apache-2.0",
"repository": {
Expand All @@ -22,24 +22,25 @@
"@loopback/context": "^1.23.4",
"@loopback/core": "^1.10.6",
"@loopback/extension-health": "^0.2.10",
"@loopback/extension-metrics": "^0.1.0",
"@loopback/openapi-v3": "^1.10.0",
"@loopback/repository": "^1.15.3",
"@loopback/rest": "^1.22.0",
"@loopback/rest-explorer": "^1.4.3",
"@loopback/service-proxy": "^1.3.10"
},
"devDependencies": {
"@loopback/build": "^2.0.15",
"@loopback/eslint-config": "^4.1.3",
"@loopback/testlab": "^1.9.3",
"@loopback/build": "^2.0.16",
"@loopback/eslint-config": "^4.1.4",
"@loopback/testlab": "^1.9.4",
"@types/node": "^12.12.5",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"@typescript-eslint/parser": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-eslint-plugin": "^2.1.0",
"eslint-plugin-mocha": "^6.2.1",
"source-map-support": "^0.5.16",
"typescript": "^3.6.4"
"typescript": "^3.7.2"
}
}
5 changes: 5 additions & 0 deletions incubator/nodejs-loopback/image/project/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {ApplicationConfig, Constructor} from '@loopback/core';
import {Bootable} from '@loopback/boot';
import {RestApplication} from '@loopback/rest';
import {HealthComponent} from '@loopback/extension-health';
import {MetricsComponent} from '@loopback/extension-metrics';
import * as path from 'path';

// The user-app is mounted from the template
const userAppModule = '../user-app';
Expand All @@ -15,8 +17,11 @@ export type BootableRestApplication = RestApplication & Bootable;
export const DemoApplication: Constructor<BootableRestApplication> = userApp.DemoApplication;

export async function main(options: ApplicationConfig = {}) {
// Set the current directory to the user-app module
process.chdir(path.join(__dirname, userAppModule));
const app = new DemoApplication(options);
app.component(HealthComponent);
app.component(MetricsComponent);
await app.boot();
await app.start();

Expand Down
2 changes: 1 addition & 1 deletion incubator/nodejs-loopback/stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: LoopBack 4
version: 0.1.6
version: 0.1.7
description: LoopBack 4 API Framework for Node.js
maintainers:
- name: Raymond Feng
Expand Down
2 changes: 1 addition & 1 deletion incubator/nodejs-loopback/templates/scaffold/.yo-rc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@loopback/cli": {
"version": "1.21.3"
"version": "1.25.1"
}
}
Loading

0 comments on commit 509ef01

Please sign in to comment.