File tree 8 files changed +100
-0
lines changed
8 files changed +100
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ * .log
3
+ config.json
Original file line number Diff line number Diff line change
1
+ {
2
+ "node" : true ,
3
+ "esnext" : true
4
+ }
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const express = require ( 'express' ) ;
4
+
5
+ const app = express ( ) ;
6
+ app . set ( 'views' , './views' ) ;
7
+ app . set ( 'view engine' , 'pug' ) ;
8
+
9
+ app . get ( '/' , ( req , res ) => {
10
+ res . status ( 200 ) . render ( 'index' ) ;
11
+ } ) ;
12
+
13
+ app . get ( / .* / , ( req , res ) => {
14
+ res . status ( 404 ) . render ( '404' , { title : '404' } ) ;
15
+ } ) ;
16
+
17
+ if ( module === require . main ) {
18
+ const server = app . listen ( process . env . PORT || 8080 , ( ) => {
19
+ const port = server . address ( ) . port ;
20
+ console . log ( `App listening on port ${ port } ` ) ;
21
+ } ) ;
22
+ }
23
+
24
+ module . exports = app ;
Original file line number Diff line number Diff line change
1
+ # Copyright 2015-2016, Google, Inc.
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ #
14
+ # [START runtime]
15
+ runtime : nodejs
16
+ env : flex
17
+ # [END runtime]
18
+
19
+ # Temporary setting to keep gcloud from uploading node_modules
20
+ skip_files :
21
+ - ^node_modules$
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " rdenn.is" ,
3
+ "version" : " 0.1.0" ,
4
+ "author" : " Robert Dennis" ,
5
+ "description" : " My personal website." ,
6
+ "main" : " app.js" ,
7
+ "scripts" : {
8
+ "start" : " node app.js" ,
9
+ "deploy" : " gcloud app deploy app.yaml" ,
10
+ "test" : " echo \" Error: no test specified\" && exit 1"
11
+ },
12
+ "repository" : {
13
+ "type" : " git" ,
14
+ "url" : " https://source.developers.google.com/p/rdenn-is/r/rdenn-is"
15
+ },
16
+ "license" : " ISC" ,
17
+ "dependencies" : {
18
+ "express" : " ^4.14.0" ,
19
+ "pug" : " ^2.0.0-beta6"
20
+ }
21
+ }
Original file line number Diff line number Diff line change
1
+ //- index.pug
2
+ extends layout.pug
3
+
4
+ block content
5
+ h1 rdenn.is
6
+ h2 404
7
+ p There is nothing here
Original file line number Diff line number Diff line change
1
+ //- index.pug
2
+ extends layout.pug
3
+
4
+ block content
5
+ h1 rdenn.is
6
+ p.
7
+ Welcome to my personal website. I'll be putting stuff here in the future.
Original file line number Diff line number Diff line change
1
+ //- layout.pug
2
+ doctype html
3
+ html( lang ="en" )
4
+ head
5
+ block title
6
+ title rdenn.is
7
+ if title && title .trim && title .trim ()
8
+ | - #{title}
9
+ block styles
10
+ block head-scripts
11
+ body
12
+ block content
13
+ block body-scripts
You can’t perform that action at this time.
0 commit comments