File tree Expand file tree Collapse file tree 3 files changed +65
-4
lines changed
Expand file tree Collapse file tree 3 files changed +65
-4
lines changed Original file line number Diff line number Diff line change 11# secret-page
22Super Duper Secret Stuff
3+
4+ Based on https://github.com/nulltask/heroku-static-provider
5+
6+ ## Installation
7+
8+ You need sign-in or sign-up to Heroku.
9+
10+ $ git clone [email protected] :keckelt/secret-page.git 11+ $ cd secret-page
12+ $ heroku create
13+ $ git push -u heroku master
14+ $ heroku open
15+
16+ ## Development
17+
18+ 0 . Install packages.
19+
20+ ``` sh
21+ $ npm install
22+ ```
23+
24+ 0. Add or update files in ` /public` .
25+ 0. Run on the local machine.
26+
27+ ` ` ` bash
28+ $ npm start
29+ ` ` `
30+
31+ 0. Check on browser.
32+ - http://localhost:5000
33+
34+ # # Deployment
35+
36+ $ git add .
37+ $ git commit -a -m ' some commit message'
38+ $ git push heroku master
39+ $ heroku open
40+
41+ # # Notes
42+
43+ # ## Adding Basic Auth
44+
45+ $ heroku config:set USER=username
46+ $ heroku config:set PASS=password
47+
48+ # ## Screencast
49+
50+ * https://vimeo.com/71315109
51+
52+ # # License
53+
54+ MIT
Original file line number Diff line number Diff line change 22 "name" : " secret-page" ,
33 "version" : " 0.0.1" ,
44 "private" : true ,
5+ "scripts" : {
6+ "start" : " nf start"
7+ },
58 "dependencies" : {
6- "express" : " ~3.3.4"
9+ "compression" : " ^1.7.4" ,
10+ "express" : " ^4.17.3" ,
11+ "morgan" : " 1.^10.0"
12+ },
13+ "devDependencies" : {
14+ "foreman" : " ~2.0.0"
715 }
816}
Original file line number Diff line number Diff line change 1-
21var express = require ( 'express' ) ;
2+ var logger = require ( 'morgan' ) ;
3+ var compression = require ( 'compression' ) ;
34var app = express ( ) ;
45
56var user = process . env . USER ;
@@ -11,8 +12,8 @@ if (user && pass) {
1112 app . use ( express . basicAuth ( user , pass ) ) ;
1213}
1314
14- app . use ( express . logger ( 'dev' ) ) ;
15- app . use ( express . compress ( ) ) ;
15+ app . use ( logger ( 'dev' ) ) ;
16+ app . use ( compression ( ) ) ;
1617app . use ( express . static ( __dirname + '/public' ) ) ;
1718
1819app . listen ( app . get ( 'port' ) , function ( ) {
You can’t perform that action at this time.
0 commit comments