The default web interface for paest, a pastebin for hackers that keeps it simple.
- Clone repo
```bash
git clone [email protected]/hashbang/paest-web.git
```
- Install CLI tools
```bash
sudo npm install -g grunt-cli grunt bower yo generator-angular
```
- Install client and grunt build dependencies
```bash
bower install
npm install
```
- Find and install an 'editorconfig' plugin in your IDE of choice
See: <http://editorconfig.org/#download>
- Install latest dependencies (if *.json files have changed)
```bash
bower install
npm install
```
- Compile
```bash
grunt build
```
Built version of application will be availible in the 'dist' directory.
To serve live uncompressed tree with live-reload on change:
grunt serve
To serve live compiled version:
grunt serve:dist
By default application will be accessible at http://localhost:9000
The entire system, front-end, back-end and cache can be easily deployed using Docker
$ docker run --name redis -d redis
$ docker run --name paest-api --link redis:redis -d hashbang/paest-server
$ docker run --name paest-web --link paest-api:paest-api -d -p 80:80 hashbang/paest-web
This setup is compatable with the yo angular generator.
You can use any "yo angular" commands to generate boilerplate complete with tests relevant to extension you want to make. You can of course just write anything by hand and these are only here as optional helpers.
Some common commands:
# Controller
yo angular:controller controllerName
# Directive
yo angular:directive directiveName
# Route
yo angular:route someroute
# Service
yo angular:service serviceName
# View
yo angular:view someview
In order to manage third party open source dependencies and ensure compatibility and cross-dependency sanity, please use package managers.
As a general rule of thumb, if it is code you did not write and your project needs it, it probably should be handeled by a package manager and not committed to the repo. It also makes sure the git-stats are accurate which is valuable to track team progress.
To add a client-side javascript dependency do:
bower install some-awesome-library --save
This will update the 'bower.json' file and ensure other developers install this as well. It will also make best efforts to install a version of a library that is compatible with existing libraries being used in the project.
To run all current tests:
grunt test
AngularJS Docs AngularJS Book AngularJS Style Guide Angular Yo Generator Docs Grunt Docs Bower Docs