Skip to content
Gabriel Lebec edited this page Sep 12, 2016 · 15 revisions

Installing the generator tool

The purpose of this tool is to generate a foundation for new projects. In order to produce these foundational files, you need to first install the tool:

npm install -g fsg

Scaffolding out the foundational files

The fsg command-line tool can be used in a couple different ways.

Option A: No Arguments

fsg

Simply running fsg in a directory creates a sub-folder generated containing your new application files.

Option B: Path Argument

Alternatively, fsg can take a file path (relative or absolute, and even one that does not exist yet), and it will use/create the destination folder and fill it with your new application files.

fsg path/to/any/directory/you/prefer

If you have already made and cd'd into a directory, and want to fill it with the new app files, simply use the . path.

fsg . # caution, this will put the new files in your current folder!

Installation & Build

After you've generated the files, ensure the following commands are run in the project root (generated/ unless you used a path argument as explained above):

npm install

Note for Linux users: if you get the error You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application, then run sudo apt-get install libpq-dev and try npm install again.

gulp build

If you do not have gulp installed on your machine, install it using npm install -g gulp.

Postgres database

Finally, the generated project assumes a running postgres database on port 5432 (the default port).