-
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=projectnameInstalling
There are some new packages, so:
cd netcreate/buildnpm run cleannpm ciThe 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/runtimefolder.Template files have been renamed from
templatename.jsontotemplatename.template.So if you have some existing projects, e.g.
tacitus, then you'll want to set up thebuild/runtimefolder like this:/build/runtime/tacitus.loki/build/runtime/tacitus.templateJust copy the
.lokiand.jsonfiles (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
tacitusand start the server. You no longer need to typenpm run dev.NOTES
projectnamedoes not exist, the system will create a new project and template with that name, cloning the_default.templatetemplate found in/build/app/assets/templates/_default.template.projectnamebut it does not have a corresponding template, a new one will be created, again using the_default.templatetemplate found in/build/app/assets/templates/_default.template./build/app/assets/templates/(or move them to theruntimefolder as appropriate).npm run packagescript for Standalone Mode will use the last project you had run with thenc.jsscript. e.g. if you had run./nc.js --dataset=tacitusthennpm run package, the standalone files in thepublicfolder will use thetacitusdatabase and template.