Skip to content

hashbang-legacy/paest-web

Repository files navigation

Paest Web

http://pae.st

About

The default web interface for paest, a pastebin for hackers that keeps it simple.

Requirements

Development

Initial Setup

  1. Clone repo
```bash
git clone [email protected]/hashbang/paest-web.git
```
  1. Install CLI tools
```bash
sudo npm install -g grunt-cli grunt bower yo generator-angular
```
  1. Install client and grunt build dependencies
```bash
bower install
npm install
```
  1. Find and install an 'editorconfig' plugin in your IDE of choice
See: <http://editorconfig.org/#download>

Building

  1. Install latest dependencies (if *.json files have changed)
```bash
bower install
npm install
```
  1. Compile
```bash
grunt build
```

Built version of application will be availible in the 'dist' directory.

Serving

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

Deploying

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

Extending

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

Dependency Management

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.

Testing

To run all current tests:

grunt test

Further Reading

AngularJS Docs AngularJS Book AngularJS Style Guide Angular Yo Generator Docs Grunt Docs Bower Docs

About

Web client for "pae.st", the simple pastebin for hackers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •