Skip to content
Source Code for my Website
JavaScript CSS HTML
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status Coverage Status License: CC BY 3.0

This is the source for my website It's built using Node.js on the server side and preact on the client side. jest and enzyme are used for testing whilst eslint and stylelint are the linters.

Image of the site

Development CLI Commands

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# run tests with jest and preact-render-spy
npm run test

# run eslint and stylelint
npm run lint

Folder Structure

    • config service files for systemd and config files for apache when using
    • coverage code coverage reports produced by jest and consumed by coveralls
    • public files that are made accessable to webrequests by webpack or express
      • data json files, currently for the link boxes on the home page and the file tree
      • img all the dynamic/large/raster image assets are here
      • files all file downloads are served from here
    • src source code for the site
      • assets small image assets that can be bake into the build are here
      • components preact components and their styles
      • routes preact routes and their styles are here
      • style Site wide styles (font familys, coulor scheme) are here
    • server server side code run by node
    • tests tests for the site
      • __mocks__ testing mocks
      • __setup__ enzyme setup script
      • components tests for the preact components
      • routes tests for the preact routes

Building and Running the pseudo Production enviroment


Head over to the repo to find out how to use vagrant to host this project. The provisioning script deals with all the installation and setup and make the site avaliable at .


To rebuild the site via npm run the following commands.

    cd /var/www/
    npm run build


If changes have been made to the site, then you'll have to restart the node app.

	sudo service restart

If changes have been made to the nginx config, then you'll have to restart nginx.

	sudo restart nginx service


To remove all the built files do

    cd /var/www/
    npm run clean
You can’t perform that action at this time.