Merge pull request #12355 from david-szabo97/patch-2

Node.js guide: Fix syntax highlighting
This commit is contained in:
Usha Mandya 2021-03-05 14:31:12 +00:00 committed by GitHub
commit 4bf9708018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,7 @@ Now, lets add some code to handle our REST requests. Well use a mock serve
Open this working directory in your IDE and add the following code into the `server.js` file. Open this working directory in your IDE and add the following code into the `server.js` file.
```node ```js
const ronin = require( 'ronin-server' ) const ronin = require( 'ronin-server' )
const mocks = require( 'ronin-mocks' ) const mocks = require( 'ronin-mocks' )
@ -72,7 +72,7 @@ $ curl http://localhost:8000/test
Switch back to the terminal where our server is running. You should now see the following requests in the server logs. Switch back to the terminal where our server is running. You should now see the following requests in the server logs.
```node ```
2020-XX-31T16:35:08:4260 INFO: POST /test 2020-XX-31T16:35:08:4260 INFO: POST /test
2020-XX-31T16:35:21:3560 INFO: GET /test 2020-XX-31T16:35:21:3560 INFO: GET /test
``` ```

View File

@ -184,7 +184,7 @@ Lets change the source code and then set a breakpoint.
Add the following code to the server.js file on line 19 and save the file. Add the following code to the server.js file on line 19 and save the file.
```node ```js
server.use( '/foo', (req, res) => { server.use( '/foo', (req, res) => {
return res.json({ "foo": "bar" }) return res.json({ "foo": "bar" })
}) })

View File

@ -37,7 +37,7 @@ Now, lets add some code to handle our REST requests. Well use a mock serve
Open this working directory in your IDE and add the following code into the `server.js` file. Open this working directory in your IDE and add the following code into the `server.js` file.
```node ```js
const ronin = require( 'ronin-server' ) const ronin = require( 'ronin-server' )
const mocks = require( 'ronin-mocks' ) const mocks = require( 'ronin-mocks' )
@ -72,7 +72,7 @@ $ curl http://localhost:8000/test
Switch back to the terminal where our server is running. You should now see the following requests in the server logs. Switch back to the terminal where our server is running. You should now see the following requests in the server logs.
```node ```
2020-XX-31T16:35:08:4260 INFO: POST /test 2020-XX-31T16:35:08:4260 INFO: POST /test
2020-XX-31T16:35:21:3560 INFO: GET /test 2020-XX-31T16:35:21:3560 INFO: GET /test
``` ```

View File

@ -200,7 +200,7 @@ Lets change the source code and then set a breakpoint.
Add the following code above the existing `server.use()` statement, and save the file. Add the following code above the existing `server.use()` statement, and save the file.
```node ```js
server.use( '/foo', (req, res) => { server.use( '/foo', (req, res) => {
return res.json({ "foo": "bar" }) return res.json({ "foo": "bar" })
}) })