File tree Expand file tree Collapse file tree 6 files changed +468
-5
lines changed
03-app-baseline-performance Expand file tree Collapse file tree 6 files changed +468
-5
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ require ( 'dotenv' ) . config ( )
4
+
5
+ const Express = require ( 'express' )
6
+ const App = Express ( )
7
+ const HTTP = require ( 'http' )
8
+
9
+ // Router Setup
10
+ App . get ( '/' , ( req , res ) => {
11
+ res . send ( '' )
12
+ } )
13
+
14
+ // Server Setup
15
+ const port = process . env . PORT
16
+ const server = HTTP . createServer ( App )
17
+
18
+ server . listen ( port , ( ) => {
19
+ console . log ( 'NodeJS Performance Optimizations listening on: ' , port )
20
+ } )
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ require ( 'dotenv' ) . config ( )
4
+
5
+ const Express = require ( 'express' )
6
+ const Helmet = require ( 'helmet' )
7
+ const App = Express ( )
8
+ const HTTP = require ( 'http' )
9
+
10
+ // Express Middleware
11
+ App . use ( Helmet ( ) )
12
+
13
+ // Router Setup
14
+ App . get ( '/' , ( req , res ) => {
15
+ res . send ( '' )
16
+ } )
17
+
18
+ // Server Setup
19
+ const port = process . env . PORT
20
+ const server = HTTP . createServer ( App )
21
+
22
+ server . listen ( port , ( ) => {
23
+ console . log ( 'NodeJS Performance Optimizations listening on: ' , port )
24
+ } )
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ require ( 'dotenv' ) . config ( )
4
+
5
+ const Express = require ( 'express' )
6
+ const Helmet = require ( 'helmet' )
7
+ const Morgan = require ( 'morgan' )
8
+ const App = Express ( )
9
+ const HTTP = require ( 'http' )
10
+
11
+ // Express Middleware
12
+ App . use ( Helmet ( ) )
13
+ App . use ( Morgan ( 'combined' ) )
14
+
15
+ // App.use(Morgan('combined', {
16
+ // skip: (req, res) => { return res.statusCode < 400 }
17
+ // }))
18
+
19
+ // Router Setup
20
+ App . get ( '/' , ( req , res ) => {
21
+ res . send ( '' )
22
+ } )
23
+
24
+ // Server Setup
25
+ const port = process . env . PORT
26
+ const server = HTTP . createServer ( App )
27
+
28
+ server . listen ( port , ( ) => {
29
+ console . log ( 'NodeJS Performance Optimizations listening on: ' , port )
30
+ } )
Original file line number Diff line number Diff line change 16
16
- [ Project Resources] ( #table-of-contents )
17
17
- [ Testing The Event Loop Phases] ( #testing-the-event-loop-phases )
18
18
- [ What Type Of Async Function Am I Running] ( #what-type-of-async-function-am-i-running )
19
+ - [ How To Determine Application Baseline Performance In Node JS] ( #how-to-determine-application-baseline-performance-in-node-js )
19
20
- [ Contributing] ( #contributing )
20
21
- [ Links] ( #links )
21
22
- [ License] ( #license )
28
29
29
30
## What Type Of Async Function Am I Running
30
31
31
- - Watch [ YouTube Video] ( https://youtu.be/ol56smloW2Q )
32
- - Read [ Blog Post] ( http://bleedingcode.com/managing-the-event-loop-phases/ )
32
+ - Watch [ YouTube Video] ( https://youtu.be/yiBLmRRRx-k )
33
33
- Source Code Folder: [ 02-async-hooks-types-of-async-functions] ( /02-async-hooks-types-of-async-functions )
34
34
35
+ ## How To Determine Application Baseline Performance In Node JS
36
+
37
+ - Watch [ YouTube Video] ( https://youtu.be/ol56smloW2Q )
38
+ - Source Code Folder: [ 03-app-baseline-performance] ( /03-app-baseline-performance )
39
+
35
40
## Contributing
36
41
37
42
1 . Fork it (< https://github.com/bleedingcode/nodejs-performance-optimizations/fork > )
You can’t perform that action at this time.
0 commit comments