Personal website written using Node and Express
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.now
css
public
server
.browser-sync.js
.eslintrc.json
.gitignore
.stylelintrc
LICENSE
README.md
index.js
package-lock.json
package.json
postcss.config.js
pre-build.js

README.md

Personal website

me

Build: CircleCI

About

My personal website (https://danielhead.com), built using a Node.js backend with Express and pug for templating. The CSS is compiled at build time using PostCSS.

Development

  • Install dependencies: npm install
  • Run: npm run dev to start the:
    • Node.js server, using nodemon for reloading
    • Browsersync server, to proxy the Node.js server
    • CSS watch task to lint and rebuild on change
    • JavaScript tests on change

Testing

  • Run npm run css:lint to test the CSS for linting errors
  • Run npm run jest to test the JavaScript

Both tests are run automatically by the npm start script

Production Build

The following steps will run a production serve on port 80:

  • export NODE_ENV=production
  • export PORT=80
  • npm run build
  • npm start