server

command module
v0.0.0-...-6098784 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2016 License: GPL-3.0 Imports: 11 Imported by: 0

README

clinot.es server CircleCI

This is a side-project in Go to play with Heroku, Postmark, Stripe and PostgreSQL.

The server at clinot.es is a remote note management service with a command line client. Use the hosted service or feel to host it by yourself …

Features

  • Create account
  • Verify account
  • Create access token
  • Verify access token
  • Create subscriptions (draft)
  • Create notes
  • List notes

Dependecies

  • PostgreSQL database
  • Postmark (send emails, required)
  • Stripe (handle subscriptions, draft)

Setup

The API server works fine on a free Heroku dyno using the free PostgreSQL add-on. The free Postmark accounts comes with 25.000 free emails, so this should last for a couple of accounts ;)

Postmark

Postmark is used for sending emails to new users. You need to create three templates in your Postmark account and configure the template IDs in your environment variables. You will find the three HTML and plaintext templates inside the templates/ folder:

Make sure to validate your sender address in Postmark as well!

Application
$ > git clone git@github.com:clinotes/server.git
$ > cd server
$ > heroku create
$ > heroku addons:create heroku-postgresql:hobby-dev
$ > git push heroku master
$ > heroku info

…
Web URL: https://exmaple-url-12345.herokuapp.com/
Environment
$ > heroku config:set MAX_DB_CONNECTIONS=5
$ > heroku config:set POSTMARK_API_KEY=API_KEY
$ > heroku config:set POSTMARK_TEMPLATE_WELCOME=TEMPLATE_ID
$ > heroku config:set POSTMARK_TEMPLATE_CONFIRM=TEMPLATE_ID
$ > heroku config:set POSTMARK_TEMPLATE_TOKEN=TEMPLATE_ID
$ > heroku config:set POSTMARK_FROM=mail@clinot.es
$ > heroku config:set POSTMARK_REPLY_TO='"CLI Notes" <mail@clinot.es>'
Client
$ > brew tap clinotes/cn
$ > brew install cn
$ > echo "CLINOTES_API_HOSTNAME: https://exmaple-url-12345.herokuapp.com/" > ~/.clinotes.yaml
$ > cn version

client: v0.2.1
server: v0.0.5 (supports client >= v0.1.0)

License

Feel free to use the server code, it's released using the GPLv3 license.

Contributors

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL