Remy Sharp
6df376f9b3
quiet boy...
2012-06-19 01:29:20 +01:00
Aron Carroll
c030ee1857
Now appending spike scripts using events
2012-06-10 14:43:21 +01:00
Aron Carroll
a5cd69c46a
Add "created" and "updated" events to BinHandler
...
It's possible these events should be triggered on the model level but
this works nicely at the moment. Also removed the spike.ping code
from the BinHandler.
2012-06-10 14:17:30 +01:00
Aron Carroll
164b56531c
Merge branch 'feature/node' into 'feature/spike'
...
Conflicts:
lib/app.js
lib/handlers.js
package.json
2012-06-10 12:24:02 +01:00
Aron Carroll
6f16cfa3ac
Detect sub-domains and update relevant url settings
2012-05-26 19:14:58 +01:00
Remy Sharp
77fe7e7d7e
Fixed path issues - fixes saving from changed urls, template restore, etc.
...
Basically, the ballache.
2012-05-25 17:03:26 +01:00
Remy Sharp
d80376f881
Read port from env, then config, then 80
2012-05-25 14:26:39 +01:00
Aron Carroll
11f9b0361d
Download is now a GET request
...
Will only download created bins. Download link in UI does not yet work.
2012-05-25 12:53:24 +01:00
Aron Carroll
2c9ecb7340
Add download endpoint
...
This takes a POST request containing html, css, javascript and filename
parameters and returns a built page.
2012-05-25 12:38:59 +01:00
Aron Carroll
4248e4d87a
Switch console.log to process.stdout to keep JSHint happy
2012-05-25 12:35:06 +01:00
Aron Carroll
9a53b3f084
Updated app.js to use the new handlers module
2012-05-20 21:00:24 +01:00
Aron Carroll
d52d7468a7
Move session.js into handlers directory
...
Created SessionHandler observable and updated app.js to use this.
2012-05-20 20:54:53 +01:00
Aron Carroll
944f5db195
Fix stupid implementation of blacklist
...
Previous version validated the last saved bin rather than the current
one.
2012-05-18 18:08:09 +01:00
Aron Carroll
47f37b55fd
Implement the blacklist module
2012-05-18 17:40:25 +01:00
Aron Carroll
96353b35bc
Add CORS support for cross origin GET requests
2012-05-18 16:55:34 +01:00
Aron Carroll
fc21633502
Add route for viewing current users history
2012-05-18 15:51:32 +01:00
Remy Sharp
ed0b7af4f1
read the app port from the config file
2012-05-14 11:17:12 +01:00
Aron Carroll
f233bb60f6
Add ability to log out!
2012-05-09 22:31:44 +01:00
Aron Carroll
c2d79ba5c1
Integrate session handers into application
...
Now it is possible to login and create a new user. No support for
home namespace, logout or owning bins yet. Also not compatible with
PHP app yet.
2012-05-05 19:38:17 +01:00
Aron Carroll
74b70eff72
Implement log portion of the string
...
I don't think this has yet been implemented in the client side though.
Logs are available at /:bin/:rev/log and can be created by posting to
the same endpoint.
2012-05-05 16:19:41 +01:00
Aron Carroll
ddebd2307f
Initial work on the server side spike code
...
Needs a massive code refactor in the near future though :)
2012-05-04 16:32:39 +01:00
Remy Sharp
a67eba4087
Support root prefix
2012-05-04 16:01:30 +01:00
Aron Carroll
ab269fff14
Prevent CSRF attacks on all post requests
2012-05-03 21:14:34 +01:00
Aron Carroll
52bdae30a0
Add cookie based session support
...
This uses signed cookies which is nice but we still should not store any
user data in the cookie.
2012-05-03 19:59:05 +01:00
Aron Carroll
b0c6d5491d
Fix issue with "url prefix" check
...
Ideally the prefix should be left empty but this (I believe) will
break the PHP app.
2012-05-01 00:22:36 +01:00
Aron Carroll
a563f2d274
Update app.js to handle path prefix
...
This essentially mounts the application as middleware within another
connect server under the specified prefix. This means that when
redirecting that helpers.url() must be used to get the full path and
req.path will be missing the prefix.
2012-05-01 00:15:44 +01:00
Aron Carroll
602f1ad485
Move error objects into thier own module
2012-04-30 23:28:24 +01:00
Aron Carroll
fe5eae899c
Move state onto Request instances via helper middleware
...
This seems a little hairy but essentially avoids creating modules
with factory functions which seems very clunky. We now provide various
helper functions that are bound to the application state such as
url, routing and models via the request object. This is massively
overloading this object but seems to be the common way in Express
apps to pass state into handlers.
2012-04-30 23:20:03 +01:00
Aron Carroll
834c2ab048
Add app.production for checking current environment
2012-04-24 09:39:12 +01:00
Aron Carroll
6be88b6e19
Implement the "quiet" flag for previewed bins
2012-04-24 09:18:44 +01:00
Aron Carroll
b2d53ec0ee
Update code to use flatten module to convert the settings object
2012-04-22 19:26:29 +01:00
Aron Carroll
261ebc047b
Update app.js to require gobo module
2012-04-22 19:09:50 +01:00
Aron Carroll
20a7ea5b3c
Add support for saving a bin revision
...
Support is still very basic but a revision can be created, streaming
is not yet supported as we are waiting on sessions.
2012-04-22 19:00:07 +01:00
Aron Carroll
2081a5a23e
Fixed "latest" redirect handlers
2012-04-20 19:20:01 +01:00
Aron Carroll
6d288d84e3
Add ability to create new bins
2012-04-20 19:06:07 +01:00
Aron Carroll
f58dffcfb3
Tidied up the "source" action
2012-04-20 15:09:59 +01:00
Aron Carroll
e35adaa7cc
Add middleware module for common middleware
...
(Need to work on my messages)
2012-04-20 15:03:03 +01:00
Aron Carroll
c31c5b68e4
Add support for "source" action
2012-04-20 14:48:57 +01:00
Aron Carroll
a5f67048b9
Add middleware to redirect to urls without trailing slash
2012-04-19 18:35:46 +01:00
Aron Carroll
bb5c23c790
Now replace text within req.path rather than req.url for redirects
2012-04-19 18:31:29 +01:00
Aron Carroll
519d60ee55
Tidy up the route files
2012-04-19 18:20:41 +01:00
Aron Carroll
70b0ccd7b0
Add "latest" action to redirect to newest bin revision
...
Also implemented file extensions to load the raw bin source.
2012-04-19 18:15:24 +01:00
Aron Carroll
8f251be49e
Use Express' nifty .param() method to load bins
2012-04-19 17:31:43 +01:00
Aron Carroll
d9f7cba17c
Build and serve development JavaScript
2012-04-19 17:28:06 +01:00
Aron Carroll
5ecc100f27
Create templates for the default and not found panels
2012-04-19 16:38:55 +01:00
Aron Carroll
f3e954bdea
Add ability to load bins from the database
2012-04-19 14:47:05 +01:00
Aron Carroll
7a3a05f5f6
Hastily updated node app to load without error
2012-04-17 18:30:59 +01:00
Aron Carroll
66efbb30f6
Hook up index root to the mustache template
2012-04-17 16:43:35 +01:00
Aron Carroll
4924ac55bc
Add mustache templating to the node app via hogan.js
2012-04-17 15:40:09 +01:00
Aron Carroll
b33eafc06f
Add support for serving static files and logging
2012-04-17 12:28:27 +01:00