- git
- docker
- docker-compose
- nodejs
- npm (usually installed with nodejs)
- npx (Install globally with npm)
- gcloud-utils
- IDE or Editor of your choice
^ You may need a linux vm to install and run these programs locally
Clone this repository using gcloud source repos clone. See the gcloud docs for more details.
You will need to create 3 files in the root of the project, these files should not be version controlled.
.gitignore, .gcloudignore, and secrets.js
Also you will need to install gcloud-utils
Add paths to files that you do not want version controlled in the .gitignore
Add an entry for .gitignore to avoid sharing this file with other team members
Candidates for files that should not be saved:
- temporary save files from your editor
- personal project notes that you dont want to share :(
- build files and directories such as those in build/ or node_modules/
- your .gcloudignore file
See the the example in the Sample directory.
Add paths to files that should not be deployed to app engine inside .gcloudignore
Candidates for files that should not be saved:
- temporary save files from your editor
- src/
- .git/
- .gitignore
- .gcloudignore
See the the example in the Sample directory.
Assign module.exports to a js object with key value pairs for the following properties:
- POSTGRES_PASSWORD
- FIREBASE_API_KEY
- JWT_PRIVATE_KEY
- JWT_PUBLIC_KEY
See the the example in the Sample directory.
See the google cloud platform gcloud documentation.
-
.git/
This directory is your local git database. Do not edit directly. -
build/
Generated by the makefile to store the compiled code for the website.
This should not be version controlled -
helpers/
Special scripts that are intended for use by the makefile to make complex tasks easier. -
node_modules/
Generated by npm to store dependencies. -
src/
Source code for the website goes in here-
css/
Contains .css, .sass, and .scss files
.css files are copied
.sass and .scss files are compiled into .css files -
html/
Contains .html and .ejs files
.html files are copied
.ejs files are compiled into .html files -
js/
Contains .js and .coffee files.
.js files are copied
.coffee files are compiled into .js files -
server/
Contains files that will be executed by the Node server-
ejs/
Contains .ejs and .html files
.ejs files are copied. They will be used as templates for dynamic html files.
.html files are copied. -
js/
Contains .js and .coffee files.
.js files are copied.
.coffee files are compiled into .js files
-
-
static/
Contains content such as images or downloads that will be served to the client.
Should only be used for a few small files, otherwise a cloud bucket or database should be used.
-
-
app.yaml
Google App Engine deployment configuration file. -
contributing.md
This document. -
docker-compose.yml
Used to run one or more docker containers for local testing purposes. -
main.js
Entry point for the Node server. -
makefile
Compiles and copies the necessary files from -
package-lock.json
Generated by npm for dependency management. -
package.json
Defines an npm package and tracks dependencies -
.gitignore
Explained in the above sections. -
.gcloudignore
Explained in the above sections.
Run the following command(s)
npx gulp
Run the following command(s)
npx gulp
docker-compose up
Type <ctrl-c>
Run the following command(s) once gcloud init has been run atleast once. See the gcloud docs for more info.
npx gulp
gcloud app deploy