https://github.com/baslr/web-client-vendor
defaults with requirejs and bower
https://github.com/baslr/web-client-vendor
Last synced: 8 months ago
JSON representation
defaults with requirejs and bower
- Host: GitHub
- URL: https://github.com/baslr/web-client-vendor
- Owner: baslr
- Created: 2013-11-03T21:10:39.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-25T14:14:36.000Z (about 12 years ago)
- Last Synced: 2025-03-16T14:49:14.910Z (12 months ago)
- Language: CoffeeScript
- Size: 270 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
web-client-vendor
=================
defaults with requirejs and bower
## how to install
### git submodule
```
$ git submodule add https://github.com/baslr/web-client-vendor path/to/vendor
$ git submodule init
$ git submodule update
$ cd path/to/vendor
$ bower install
```
in your index.html `````` insert
```html
```
the your app file should look like this:
```coffeescript
define (require, exports, module) ->
module.exports = ->
console.log 'I was called'
undefined
```
to disable authentification via websockets just configure it with requirejs config:
```coffeescript
requirejs.config
config:
socket:
auth: false
```
minimal Websocket backend
```coffeescript
on 'auth', (key) ->
if key is valid
emit 'userName', userName
else
emit 'login'
on 'login', (email, password) ->
if email is valid and password is valid
generate key
emit 'key', newKey
emit 'userName', userName
else
emit 'login'