1devdaytalk2014

module
v0.0.0-...-5c7d83b Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2014 License: MIT

README

* 1DevDayTalk2014
Slides and code for my 1DevDay talk for 2014

* Running
In order to run this software you will need to install:
   - Go
   - Godep (go get github.com/tools/godep)

Then you can type
#+BEGIN_SRC sh
make run
#+END_SRC

From your browser connect to [[http://localhost:8081]].

You will be prompted for a username and password. These are hard coded
in the system (see ws/rest/users/users.go login method) to:
    - Username: admin
    - Password: admin

* Setup

** RSA
This project comes with a set of RSA keys used for JWT token
generation. The key files can be found in the config directory. To
generate new keys do the following:

#+BEGIN_SRC sh
openssl genrsa -out app.rsa 1024
openssl rsa -in app.rsa -pubout > app.rsa.pub
#+END_SRC

** Environment variables
The server depends on two environment variables. The Makefile sets
these variables automatically when you do "make run". The variables
are:
    - DEVDAY_WEBDIR: Location of the website files
    - DEVDAY_CONFIG: Location of the config directory

* Server Command Line
The server accepts two arguments: "--port" and "--bind" by default
port is set to 8081, and bind is set to localhost.

* Dependencies
All dependencies are included in the project.

The following web libraries/frameworks are used:
    - Restangular ([[https://github.com/mgonto/restangular]])
    - ui-router ([[https://github.com/angular-ui/ui-router]])
    - ng-websocket ([[https://github.com/wilk/ng-websocket]])
      - Please note that there is currently an issue with opening a closed socket.
        Use the version in this repo until it has been patched.
    - angular-jwt ([[https://github.com/auth0/angular-jwt]])
    - lodash ([[https://lodash.com/]])
    - Bootstrap
    - AngularJS

The Go dependencies are included under the Godeps directory. The
following external Go packages are used:
   - code.google.com/p/go.net/websocket
   - github.com/dgrijalva/jwt-go
   - github.com/emicklei/go-restful
   - github.com/jessevdk/go-flags

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go.net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
_workspace/src/github.com/dgrijalva/jwt-go
Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html
Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html
A useful example app.
_workspace/src/github.com/emicklei/go-restful
Package restful, a lean package for creating REST-style WebServices without magic.
Package restful, a lean package for creating REST-style WebServices without magic.
_workspace/src/github.com/emicklei/go-restful/swagger
Package swagger implements the structures of the Swagger (https://github.com/wordnik/swagger-core/wiki) specification
Package swagger implements the structures of the Swagger (https://github.com/wordnik/swagger-core/wiki) specification
_workspace/src/github.com/jessevdk/go-flags
Package flags provides an extensive command line option parser.
Package flags provides an extensive command line option parser.
app
cmd
ws

Jump to

Keyboard shortcuts

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