Skip to content

Commit

Permalink
docs: tutorial docs wording improvements & code highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed Jan 15, 2025
1 parent a3c080a commit dee32bf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/tutorial/expressjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,18 +304,19 @@ Update the ExpressJS application
As a final step, let's update our application. For example,
we want to add a new ``/time`` endpoint which returns the current time.

Start by opening the ``time.js`` file in a text editor and update the code to
Start by creating the ``time.js`` file in a text editor and update the code to
look like the following:

.. literalinclude:: code/expressjs/time.js
:language: python
:language: javascript

Place ``time.js`` file into the appropriate ``routes/`` directory. Import the
time route from the the main ``app.js`` file and update the code to look like
the following:
Place ``time.js`` file into the appropriate ``app/routes/`` directory. Import
the time route from the the main ``app.js`` file and update the code to look
like the following:

.. literalinclude:: code/expressjs/app.js
:language: javascript
:emphasize-lines: 9,25

Notice the addition of timerouter import and the registration of the ``/time``
endpoint.
Expand Down

0 comments on commit dee32bf

Please sign in to comment.