@@ -4,11 +4,12 @@ const app = express();
4
4
const DEFAULT_PORT = 3000 ;
5
5
const port = parseInt ( process . env . PORT || '' , 10 ) || DEFAULT_PORT ;
6
6
7
- app . use ( '/health' , ( req , res ) => res . send ( 'ok' ) ) ;
8
- app . use ( '/hostname' , ( req , res ) => res . send ( process . env . HOSTNAME ) ) ;
9
- app . use ( '/users' , ( req , res ) => res . send ( `👩🏼🦰👨🏻⚕️🕵🏼♀️🧓🏻👱🏻♂️👦🏻 served from ${ process . env . HOSTNAME } ` ) ) ;
10
- app . use ( '/apps' , ( req , res ) => res . send ( `👩🏻💻👨🏻💻🧑🏼💻🧑🏿💻👨🏼💻👩💻 served from ${ process . env . HOSTNAME } ` ) ) ;
11
- app . use ( '/products' , ( req , res ) => res . send ( `🍩🍪🥧🥐🥯🥖 served from ${ process . env . HOSTNAME } ` ) ) ;
12
- app . use ( '/' , ( req , res ) => res . send ( `🍪 served from ${ process . env . HOSTNAME } ` ) ) ;
7
+ app . get ( '/' , ( req , res ) => res . send ( `🍪 served from ${ process . env . HOSTNAME } ` ) ) ;
8
+ app . get ( '/health' , ( req , res ) => res . send ( 'ok' ) ) ;
9
+ app . get ( '/hostname' , ( req , res ) => res . send ( process . env . HOSTNAME ) ) ;
10
+ app . get ( '/users' , ( req , res ) => res . send ( `👩🏼🦰👨🏻⚕️🕵🏼♀️🧓🏻👱🏻♂️👦🏻 served from ${ process . env . HOSTNAME } ` ) ) ;
11
+ app . get ( '/apps' , ( req , res ) => res . send ( `👩🏻💻👨🏻💻🧑🏼💻🧑🏿💻👨🏼💻👩💻 served from ${ process . env . HOSTNAME } ` ) ) ;
12
+ app . get ( '/products' , ( req , res ) => res . send ( `🍩🍪🥧🥐🥯🥖 served from ${ process . env . HOSTNAME } ` ) ) ;
13
+ app . get ( '*' , ( req , res ) => res . send ( 'burned!' ) ) ;
13
14
14
15
app . listen ( port , ( ) => console . log ( `serving cookies from http://localhost:${ port } /` ) ) ;
0 commit comments