dingoblog / dingo

Blog engine written in Go
MIT License
284 stars 37 forks source link

PostgreSQL & MySQL support #62

Open dinever opened 8 years ago

dinever commented 8 years ago

I'm planning to add a Deploy to Heroku button in the README file so that users can easily deploy the application without owning a server.

However, Heroku does not support SQLite for some security reasons. So let's add some support for PostgreSQL which Heroku supports very well.

This shouldn't be hard to achieve as we already have those SQL statements. To switch between SQLite and PostgreSQL/MySQL let's add an environment variable named DATABASE_URL, which indicates the URL of the PostgreSQL/MySQL server. If the environment variable is not set, use SQLite instead.