Code Monkey home page Code Monkey logo

burntsushi-blog's Introduction

This project is marked for a do-over. Don't use it.

This is a very simple blog application for my homepage. It is my first
web application with Go.

In includes usage of HTTP basic authentication with abbot's 'go-http-auth'
package, CAPTCHA with dchest's 'captcha' package, URL routing with
gorilla's 'mux' package and Markdown parsing with russross' 'blackfriday'
package.

The basic approach here is to keep cached copies of all views, blog posts
and comments and update them as new ones are added. Namely, when new comments
are added, the comment cache for that post is updated. The views and blog posts
caches can be updated by visiting blog.burntsushi.net/refresh. (Of course, a 
user name and password are required; you didn't take me for an idiot, now did 
you? :P)

There is also an example of piping a text templates output into the standard 
input of the 'mailx' program (so that I get email notifications whenever a new 
comment is posted). Go's Reader/Writer interfaces made this stupidly simple.

It bares mentioning that the sync package's RWMutex and Mutex types 
keep everything thread safe. goroutines and channels didn't seem to fit with 
the 'many readers OR a single writer' model.

Many thanks to manveru, whose own blog application greatly inspired mine:
https://github.com/manveru/manveru.name

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.