Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added simple session example and updated readmes
- Loading branch information
Showing
8 changed files
with
54 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
1.8 | ||
================== | ||
# 1.8 | ||
|
||
* added history.md for change tracking | ||
* updated stable dependencies | ||
* added bootstrap-stylus | ||
* updated readme.md to better reflect technologies and dependencies | ||
- added history.md for change tracking | ||
- updated stable dependencies | ||
- added bootstrap-stylus | ||
- updated readme.md to better reflect technologies and dependencies | ||
- added session example | ||
- see `./src/controllers/private.coffee` for examples of privates controllers | ||
- see `./src/routes.coffee` for auth through routing example | ||
- see `./src/index.coffee` for session config example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = | ||
|
||
# Lists all posts | ||
index: (req, res) -> | ||
res.send 'This is a private page.' | ||
|
||
# Create a session | ||
create: (req, res) -> | ||
req.session.authorized = 'test' | ||
res.redirect '/private' | ||
|
||
# Destroy a session | ||
destroy: (req, res) -> | ||
delete req.session.authorized | ||
res.redirect '/private' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
h1 401 | ||
p Unauthorized access. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
h1 404 | ||
p Sorry! that link doesn't exist. |