-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5d846d8
Showing
17 changed files
with
245 additions
and
0 deletions.
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,13 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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 @@ | ||
/client/ |
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,3 @@ | ||
{ | ||
"extends": "loopback" | ||
} |
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,19 @@ | ||
*.csv | ||
*.dat | ||
*.iml | ||
*.log | ||
*.out | ||
*.pid | ||
*.seed | ||
*.sublime-* | ||
*.swo | ||
*.swp | ||
*.tgz | ||
*.xml | ||
.DS_Store | ||
.idea | ||
.project | ||
.strong-pm | ||
coverage | ||
node_modules | ||
npm-debug.log |
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,3 @@ | ||
{ | ||
"generator-loopback": {} | ||
} |
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,3 @@ | ||
# My Application | ||
|
||
The project is generated by [LoopBack](http://loopback.io). |
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,3 @@ | ||
## Client | ||
|
||
This is the place for your application front-end files. |
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,29 @@ | ||
{ | ||
"name": "citas", | ||
"version": "1.0.0", | ||
"main": "server/server.js", | ||
"scripts": { | ||
"start": "node .", | ||
"pretest": "eslint .", | ||
"posttest": "nsp check" | ||
}, | ||
"dependencies": { | ||
"compression": "^1.0.3", | ||
"cors": "^2.5.2", | ||
"helmet": "^1.3.0", | ||
"loopback-boot": "^2.6.5", | ||
"loopback-component-explorer": "^2.4.0", | ||
"serve-favicon": "^2.0.1", | ||
"loopback": "^3.0.0-alpha.1" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^2.5.3", | ||
"nsp": "^2.1.0" | ||
}, | ||
"repository": { | ||
"type": "", | ||
"url": "" | ||
}, | ||
"license": "UNLICENSED", | ||
"description": "citas" | ||
} |
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,4 @@ | ||
module.exports = function enableAuthentication(server) { | ||
// enable authentication | ||
server.enableAuth(); | ||
}; |
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,6 @@ | ||
module.exports = function(server) { | ||
// Install a `/` route that returns server status | ||
var router = server.loopback.Router(); | ||
router.get('/', server.loopback.status()); | ||
server.use(router); | ||
}; |
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,5 @@ | ||
{ | ||
"loopback-component-explorer": { | ||
"mountPath": "/explorer" | ||
} | ||
} |
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,27 @@ | ||
{ | ||
"restApiRoot": "/api", | ||
"host": "0.0.0.0", | ||
"port": 3000, | ||
"remoting": { | ||
"context": { | ||
"enableHttpContext": false | ||
}, | ||
"rest": { | ||
"normalizeHttpPath": false, | ||
"xml": false | ||
}, | ||
"json": { | ||
"strict": false, | ||
"limit": "100kb" | ||
}, | ||
"urlencoded": { | ||
"extended": true, | ||
"limit": "100kb" | ||
}, | ||
"cors": false, | ||
"errorHandler": { | ||
"disableStackTrace": false | ||
} | ||
}, | ||
"legacyExplorer": false | ||
} |
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,6 @@ | ||
{ | ||
"db": { | ||
"name": "db", | ||
"connector": "memory" | ||
} | ||
} |
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,52 @@ | ||
{ | ||
"initial:before": { | ||
"loopback#favicon": {} | ||
}, | ||
"initial": { | ||
"compression": {}, | ||
"cors": { | ||
"params": { | ||
"origin": true, | ||
"credentials": true, | ||
"maxAge": 86400 | ||
} | ||
}, | ||
"helmet#xssFilter": {}, | ||
"helmet#frameguard": { | ||
"params": [ | ||
"deny" | ||
] | ||
}, | ||
"helmet#hsts": { | ||
"params": { | ||
"maxAge": 0, | ||
"includeSubdomains": true | ||
} | ||
}, | ||
"helmet#hidePoweredBy": {}, | ||
"helmet#ieNoOpen": {}, | ||
"helmet#noSniff": {}, | ||
"helmet#noCache": { | ||
"enabled": false | ||
} | ||
}, | ||
"session": { | ||
}, | ||
"auth": { | ||
}, | ||
"parse": { | ||
}, | ||
"routes": { | ||
"loopback#rest": { | ||
"paths": ["${restApiRoot}"] | ||
} | ||
}, | ||
"files": { | ||
}, | ||
"final": { | ||
"loopback#urlNotFound": {} | ||
}, | ||
"final:after": { | ||
"loopback#errorHandler": {} | ||
} | ||
} |
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,9 @@ | ||
{ | ||
"final:after": { | ||
"loopback#errorHandler": { | ||
"params": { | ||
"includeStack": false | ||
} | ||
} | ||
} | ||
} |
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,35 @@ | ||
{ | ||
"_meta": { | ||
"sources": [ | ||
"loopback/common/models", | ||
"loopback/server/models", | ||
"../common/models", | ||
"./models" | ||
], | ||
"mixins": [ | ||
"loopback/common/mixins", | ||
"loopback/server/mixins", | ||
"../common/mixins", | ||
"./mixins" | ||
] | ||
}, | ||
"User": { | ||
"dataSource": "db" | ||
}, | ||
"AccessToken": { | ||
"dataSource": "db", | ||
"public": false | ||
}, | ||
"ACL": { | ||
"dataSource": "db", | ||
"public": false | ||
}, | ||
"RoleMapping": { | ||
"dataSource": "db", | ||
"public": false | ||
}, | ||
"Role": { | ||
"dataSource": "db", | ||
"public": false | ||
} | ||
} |
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,27 @@ | ||
var loopback = require('loopback'); | ||
var boot = require('loopback-boot'); | ||
|
||
var app = module.exports = loopback(); | ||
|
||
app.start = function() { | ||
// start the web server | ||
return app.listen(function() { | ||
app.emit('started'); | ||
var baseUrl = app.get('url').replace(/\/$/, ''); | ||
console.log('Web server listening at: %s', baseUrl); | ||
if (app.get('loopback-component-explorer')) { | ||
var explorerPath = app.get('loopback-component-explorer').mountPath; | ||
console.log('Browse your REST API at %s%s', baseUrl, explorerPath); | ||
} | ||
}); | ||
}; | ||
|
||
// Bootstrap the application, configure models, datasources and middleware. | ||
// Sub-apps like REST API are mounted via boot scripts. | ||
boot(app, __dirname, function(err) { | ||
if (err) throw err; | ||
|
||
// start the server if `$ node server.js` | ||
if (require.main === module) | ||
app.start(); | ||
}); |