Learn

Learn how to get started with Triangulate.

1. Installation

Triangulate is a basic Express JS application.  So, installation is easy.  Just create a directory, clone, and install with NPM.  Triangulate does require NodeJS (version 12+ recommended) and NPM.

# setup directories
mkdir my-website
cd my-website

# clone repository
git clone https://github.com/madoublet/triangulate.git .

# install dependencies
npm install

# copy settings file
cp .env.sample .env

# start app
npm start

2. Editing the Content on your Site

You can access the triangulate app at http://localhost:3000/edit.  If you publish your app to a url, then you can edit it at https://mydomain.com/edit.

3. Editing your website code

Yes, you can modify the HTML, CSS, and JavaScript directly in your site folder!  Just navigate to your website directory and edit with your favorite IDE.  If you change CSS and JS within the site folder, you will need to run the following command to compress and combine the files into the site.all.css and site.all.js files.

# switch to site directory
cd my-website/site

# edit files

# build site.all.css and site.all.js
gulp

4. Deploying your website

Triangulate produces static websites.  So, you have a ton of great options to deploy and host your website: 

The big thing to remember is that you will still need a way to process forms.  The Triangulate app ships with a form processing API.  However, this does mean you have to deploy the app and make it public.  This might be perfect if you plan non-local access to Triangulate.  Alternatively, we have provided you with an AWS Lambda function that can easily be deployed to have a true serverless website.

5. Updating Triangulate App

Updating Triangulate is really straightforward.  Just pull the latest changes and run npm update.

# navigate to app directory
git pull
npm update
npm start

Help us make Triangulate better. Learn how you can contribute.