Code Monkey home page Code Monkey logo

q42.nl's Introduction

Q42.nl runs on Meteor!

We've published the source code to q42.nl and q42.com here for your perusal.

If you find anything on our site that you feel needs fixing, be it code, spelling or anything else, don't hesitate to send us a pull request or create an issue. We maintain the site ourselves with the same workflow.

Getting the damn thing to run

Sounds like it'll be a royal pain in the butt ey? Guess again amigo.

Fork and checkout this project

The hard bit since the repo is around ~100MB

git clone https://github.com/[YOURUSERNAME]/q42.nl.git

Install meteor

curl https://install.meteor.com | /bin/sh

But I have Windows

Visit http://win.meteor.com/ for instructions on how to get Meteor running on Windows.

Install the Meteorite package manager

sudo npm install -g meteorite

Install packages locally

mrt install

Add a tumblr API key

Create a file in the server/lib directory called tumblr_api_key.js that declares the TUMBLR_KEY constant:

TUMBLR_KEY = "MY_KEY";

This is required for the blog to not explode (even though you won't actually be able to see any posts without our real API key).

Set up the CDN

We are now serving all assets from a Google Cloud Storage bucket. To set this up on your machine you're going to need the gsutil command line utility. Info on how to get this running and other details you might be interested in are found here:

https://developers.google.com/storage/docs/gsutil_install

The gsutil command is used by the deploy.sh script when deploying the site. It will publish all the assets to the CDN for you automatically! Unfortunately, to be able to do this you need to have write access to the bucket. Which you probably don't have. So you won't be able to deploy the site. If this happens, just get in touch with Rahul (http://github.com/primigenus) and he can add you to the list.

Now that assets are served from the CDN, Meteor's /public folder is only useful for local development. From now on we'll be referencing all assets via http://static.q42.nl, so no more <img src="/mypicture.jpg">! To get things working nicely in local dev, you'll need to add http://static.q42.nl to your hosts file:

127.0.0.1 static.q42.nl

But since Meteor runs on port 3000, this won't work, so we'll have to run Meteor on port 80 too (see below).

cd into checkout and run meteor

cd q42.nl
sudo meteor --port 80

Note that we need to use sudo to get it to bind to port 80.

Deploying

Since you need to deploy to two separate sites (q42.nl and q42.com), there's a script which will take care of both commands. Just run:

./deploy.sh

Only authenticated users can deploy using Meteor's developer accounts system.

Contributing

Content for the site is located in the /views folder as regular .html files, so if you want to edit some content, just navigate to that file and edit it! A really fast way to clean up spelling mistakes and similar small problems is to just load the repository on Github and use its built-in editor to edit files. Github will automatically fork the project for you and submit a pull request. Yay!

Credits

We use the reblog icon by Yo Szczepanska from the Noun Project: http://thenounproject.com/term/reblog/7116/ (CC BY 3.0).

License?

There is no license. This is the code for our website, copyright Q42. You can browse the source and learn from our mishaps, but please don't re-use the code elsewhere or redistribute it.

q42.nl's People

Contributors

chees avatar chriswaalberg avatar crunchie84 avatar erikvdv1 avatar frankraterink avatar huijkman avatar lukasvan3l avatar m0rgenst0nd avatar m0rph3v5 avatar mpdreamz avatar primigenus avatar rilem avatar roelfjan avatar sanderploegsma avatar sjoerdvisscher avatar tomlokhorst avatar vanoorschot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.