<!-- 
/*
Copyright 2017 apHarmony

This file is part of jsHarmony.

jsHarmony is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

jsHarmony is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this package.  If not, see <http://www.gnu.org/licenses/>.
*/
-->
<script type="text/x-tutorial-info">
{
  "Title": "Creating a Project",
  "Menu": ["Getting Started"]
}
</script>

<h3>System Requirements</h3>
jsHarmony requires Node.js and NPM (usually included with Node.js).  Please install Node.js version 6.9 or higher, available from the Node.js website:<br/>
<br/>
<a href="https://nodejs.org/en/" target="_blank">Download Node.js</a>

<h3>Installing the CLI (Command Line Interface)</h3>
jsHarmony projects are easily created via the Command Line Interface (CLI).  The CLI can be installed via the following command:
<pre class="shell">npm install jsharmony-cli -g</pre>
After installing the CLI, the "jsharmony" command will be available for creating jsHarmony projects, databases, and models.

<h3>Creating a jsHarmony Factory Project</h3>
The jsHarmony Factory is a full-featured application development platform, including the following features:
<ul>
  <li>User Authentication and Management</li>
  <li>Menu Management</li>
  <li>List of Values Maintenance</li>
  <li>Help Screens and Maintenance</li>
  <li>Text Maintenance</li>
  <li>Notes and Documents</li>
  <li>Job Processor</li>
  <li>Client Portal</li>
</ul>
jsHarmony Factory projects are created via the CLI.  <br/>
<br/>
Create an empty folder for the project, cd into that folder, and type the following command:
<pre class="shell">jsharmony create factory</pre>
The CLI leads the user through a step-by-step wizard, automatically generating the Node.js project and creating a new database.<br/>
<br/>
<b>Integrating with an Existing Database</b><br/>
When adding jsHarmony Factory to an existing database, select "No" when asked by the installer whether create a new database.  Then, modify the app.config.local.js file with the existing database credentials and type the following command from the project root:
<pre class="shell">jsharmony init database</pre>
All jsHarmony tables will be added to the jsHarmony schema, separating them from the existing data.<br/>
<br/>
When connecting to an existing database, it is recommended to create a new user for exclusive use by the jsHarmony server.

<h3>Creating an Empty Project</h3>
In most use cases, it is recommended to create a jsHarmony Factory project instead of an empty project, to take advantage of the built-in security and administration features.  An empty jsHarmony project can still be useful in certain instances, such as when creating a new jsHarmony Module, however it may require advanced programming.<br/>
<br/>
Empty jsHarmony projects are created via the CLI.  <br/>
<br/>
Create an empty folder for the project, cd into that folder, and type:
<pre class="shell">jsharmony create empty</pre>
The wizard will ask step-by-step questions and generate the Node.js project.  No database tables are created for empty jsHarmony projects.
