Repository for https://twolfson.com/
This server is written on top of express, for routing and views, and jojo, for blog entries.
We use inuit.css as our CSS framework to provide OOCSS and BEM conventions.
The following steps will get a server running locally:
# Clone the repository
git clone https://github.com/twolfson/twolfson.com
cd twolfson.com
# Install our dependencies
npm install
# Run the server
npm start # should say 'Server running at http://localhost:8080/'
# For continuous development, use `nodemon`
# nodemon -x bin/twolfson.comThe server should be accessible via your browser at http://localhost:8080/
Our secrets are stored in environment variables. To update a secret, update it in:
.env.developmentwith a mock example.env.development.localfor actual usage- In each server, under
/etc/supervisord.conf
Historically we used SOPS but it was overkill for a simple blog server, and setup across new computers was tedious with no extra value.
Additional documentation can be found in:
Our CSS is written in SASS.
CSS compilation is run by default as part of the main gulp build task but can be run standalone:
gulp build-cssImages are compiled into spritesheets via gulp.spritesmith. These are run via a standalone gulp task:
gulp spriteExternal JS libraries are managed via bin/bootstrap.sh. To install the latest versions, please run:
bin/bootstrap.shAs with CSS these are run by default as part of the main gulp build task but can be run standalone:
gulp build-jsWe leverage gulp to automatically re-run JS and CSS tasks when their files change.
Additionally, they are integrated with LiveReload. When the complementary browser extension is installed, your browser will automatically reload CSS or refresh the page upon changes.
npm run developLiveReload extension: https://livereload.com/extensions/
articles/- GitHub Flavored Markdown files for blog postsbin/twolfson.com- Executable to starttwolfson.comlocallyconfig/- Static configuration files and resource initializationdist/- Minified public filesserver/- Container for majority of appindex.js- Constructor for server that binds view and routing middlewarescontrollers/- Business logic for server endpointsmodels/- External data for the server to read inroutes.js- Attachements forcontrollers/to URLsviews/- HTML templates written in Jade
public/- CSS, images, and JavaScript for client side pagestest/- Container for various test typesintegrations-tests/- BDD tests written in mocha that test server behaviorperceptual-tests/- Perceptual diffs that detect visual changes across pagesproduction-tests/- BDD tests written in Mocha for [twolfson.com][twolfson.com]utils/- Common utilities used for starting up/tearing down servers and making HTTP requests
CHANGELOG.md- Record of changes that have happened on the serverREADME.md- Documentation for the projectgulpfile.js- Configuration for various tasks viagulp
Support this project and others by twolfson via donations.
https://twolfson.com/support-me
Copyright (c) 2013-2014 Todd Wolfson
Licensed under the MIT license.
