This script sets up a fresh installation of HTML5UP's Phantom on an Amazon EC2 Ubuntu NodeJS/Express Server.
The script was written to automate the process of preparing an Express web application with the HTML5UP Phantom template. It should run without incident on a new Amazon EC2 instance running Ubuntu. Once the template is integrated into the Express web application the developer can veer off into more meaningful study and coding.
- Enable the Yarn repository. Import the repository’s GPG key using a curl command.
- Add the Yarn APT repository to system software repository list.
- Update the package list and install Yarn. This also installs Node. Install unzip and then install NPM last.
- Install Express Generator. This allows the user to issue the express command at the BASH prompt.
- Verify that all the packages have been properly installed at this point. Make sure to verify the version numbers because version 4.0.0 of the Express Generator was buggy.
- Install html2pug so that there is a command line utility that will allow for the conversion of HTML to PUG. HTML5UP is marked up in HTML.
- Create the web application skeleton by issuing the express command with arguments (SASS and PUG support is required for HTML5UP templates).
- Download the HTML5UP template.
- Install the template into the generic Express generated directory structure.
- Start the web application on port 3000. Make sure that access is configured for the network interface over at Amazon.
git clone https://github.com/usefulcoin/express-html5up-phantom-initialization.git
cd express-html5up-phantom-initialization
bash setup.bash
Change the debug mode to true in the setup.bash script.