Bootstrap data support
This commit is contained in:
parent
22eea95157
commit
7c1896223b
17
portal-api/bootstrap-data.js
vendored
Normal file
17
portal-api/bootstrap-data.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const Data = require('./lib/data');
|
||||
const Examples = require('./lib/models/examples');
|
||||
|
||||
const data = new Data();
|
||||
|
||||
data.connect(() => {
|
||||
data.createDeployment(Examples.deployment).then((deployment) => {
|
||||
data.createManifest(deployment.id, Examples.manifest).then((manifest) => {
|
||||
console.log('deployment with manifest created');
|
||||
process.exit(0);
|
||||
});
|
||||
}).catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
});
|
@ -4,6 +4,7 @@
|
||||
"description": "",
|
||||
"main": "./lib/index.js",
|
||||
"scripts": {
|
||||
"bootstrap": "node ./bootstrap-data",
|
||||
"lint": "belly-button",
|
||||
"rethinkdb-up": "docker run -d -p 8080:8080 -p 28015:28015 -p 29015:29015 --name rethinkdb rethinkdb",
|
||||
"rethinkdb-down": "docker rm -f rethinkdb",
|
||||
|
Loading…
Reference in New Issue
Block a user