Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: migrate LB3 models mounted on LB4 app
Migrates LB4 models mounted on LB4 an app.
- Loading branch information
Hage Yaapa
committed
Sep 24, 2019
1 parent
7bf6f12
commit f0e9f46
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
|
||
const loopback = require('loopback'); | ||
const boot = require('loopback-boot'); | ||
|
||
const app = (module.exports = loopback()); | ||
|
||
app.dataSource('memory', {connector: 'memory'}); | ||
const Color = app.registry.createModel('Color', {name: String}); | ||
app.model(Color, {dataSource: 'memory'}); | ||
|
||
app.get('/hello', (req, res) => { | ||
res.send('hello'); | ||
}); | ||
|
||
boot(app, __dirname, function(err) { | ||
if (err) throw err; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters