-
Notifications
You must be signed in to change notification settings - Fork 3
Console Script to Select Database + Template #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…eld labels from template. (Only a few fields were properly reading from template)
… to indicate where NC_LOGIC replacements shoudl go.
…e. NEEDS package script to copy dataset.template to standalone-db.template.
…e-template.template`
… help text and error checking.
THINGS TO UPDATE
COOL THINGS NOTICED
CODE REVIEW-Y THINGS THAT DON'T NEED CHANGING
|
I'm waiting for the correction of the template file naming before I accept this pull request, unless there is a good reason not to do so. |
…ndalone-template.json`
@daveseah The |
You can now select a database file, a corresponding template file, and start the server with one command:
./nc.js --dataset=projectname
Installing
There are some new packages, so:
cd netcreate/build
npm run clean
npm ci
The script won't run until these packages are installed.
Set up
The script expects your database file and template file to have the same name. And it expects to find them in the
build/runtime
folder.Template files have been renamed from
templatename.json
totemplatename.template
.So if you have some existing projects, e.g.
tacitus
, then you'll want to set up thebuild/runtime
folder like this:/build/runtime/tacitus.loki
/build/runtime/tacitus.template
Just copy the
.loki
and.json
files (that you were using as a template) to the runtime folder and rename them.To Run the Script
cd netcreate/build
./nc.js --dataset=projectname
(e.g.--dataset=tacitus
)This will set up the app to load the project called
tacitus
and start the server. You no longer need to typenpm run dev
.NOTES
projectname
does not exist, the system will create a new project and template with that name, cloning the_default.template
template found in/build/app/assets/templates/_default.template
.projectname
but it does not have a corresponding template, a new one will be created, again using the_default.template
template found in/build/app/assets/templates/_default.template
./build/app/assets/templates/
(or move them to theruntime
folder as appropriate).npm run package
script for Standalone Mode will use the last project you had run with thenc.js
script. e.g. if you had run./nc.js --dataset=tacitus
thennpm run package
, the standalone files in thepublic
folder will use thetacitus
database and template.