feat: update backend project links (#39314)
* feat: update backend project links Replace solution and remix Glitch links with equivalent Repl.it links in backend projects/challenges and intro pages. * fix: link and Repl.it casing * fix: update mention of glitch in testing challenge * Apply suggestions from code review Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9a4976bd57
commit
6b3c61c737
@ -8,16 +8,19 @@ forumTopicId: 301515
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
During the development process, it is important to be able to check what’s going on in your code. Node is just a JavaScript environment. Like client side JavaScript, you can use the console to display useful debug information. On your local machine, you would see the console output in a terminal. On Glitch you can open the logs in the lower part of the screen. You can toggle the log panel with the button ‘Logs’ (lower-left, inside the tools menu).
|
||||
We recommend to keep the log panel open while working at these challenges. By reading the logs, you can be aware of the nature of errors that may occur.
|
||||
During the development process, it is important to be able to check what’s going on in your code.
|
||||
|
||||
Node is just a JavaScript environment. Like client side JavaScript, you can use the console to display useful debug information. On your local machine, you would see console output in a terminal. On Repl.it, a terminal is open in the right pane by default.
|
||||
|
||||
We recommend to keep the terminal open while working at these challenges. By reading the output in the terminal, you can see any errors that may occur.
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
|
||||
If you have not already done so, please read the instructions in [the introduction](/learn/apis-and-microservices/basic-node-and-express/) and start a new project on Glitch using [this link](https://glitch.com/edit/#!/remix/clone-from-repo?REPO_URL=https://github.com/freeCodeCamp/boilerplate-express/).
|
||||
If you have not already done so, please read the instructions in [the introduction](/learn/apis-and-microservices/basic-node-and-express/) and start a new project on Repl.it using [this link](https://repl.it/github/freeCodeCamp/boilerplate-express).
|
||||
|
||||
Modify the <code>myApp.js</code> file to log "Hello World" to the console.
|
||||
Modify the <code>myApp.js</code> file to log "Hello World" to the console.
|
||||
|
||||
</section>
|
||||
|
||||
|
@ -8,7 +8,7 @@ forumTopicId: 301519
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
In the first two lines of the file <code>myApp.js</code>, you can see how easy it is to create an Express app object. This object has several methods, and you will learn many of them in these challenges. One fundamental method is <code>app.listen(port)</code>. It tells your server to listen on a given port, putting it in running state. You can see it at the bottom of the file. It is inside comments because, for testing reasons, we need the app to be running in the background. All the code that you may want to add goes between these two fundamental parts. Glitch stores the port number in the environment variable <code>process.env.PORT</code>. Its value is <code>3000</code>.
|
||||
In the first two lines of the file <code>myApp.js</code>, you can see how easy it is to create an Express app object. This object has several methods, and you will learn many of them in these challenges. One fundamental method is <code>app.listen(port)</code>. It tells your server to listen on a given port, putting it in running state. You can see it at the bottom of the file. It is inside comments because, for testing reasons, we need the app to be running in the background. All the code that you may want to add goes between these two fundamental parts. Repl.it stores the port number in the environment variable <code>process.env.PORT</code>. Its value is <code>3000</code>.
|
||||
Let’s serve our first string! In Express, routes takes the following structure: <code>app.METHOD(PATH, HANDLER)</code>. METHOD is an http method in lowercase. PATH is a relative path on the server (it can be a string, or even a regular expression). HANDLER is a function that Express calls when the route is matched.
|
||||
Handlers take the form <code>function(req, res) {...}</code>, where req is the request object, and res is the response object. For example, the handler
|
||||
|
||||
@ -24,7 +24,7 @@ will serve the string 'Response String'.
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
Use the <code>app.get()</code> method to serve the string "Hello Express" to GET requests matching the <code>/</code> (root) path.
|
||||
<strong>Note:</strong> Be sure that your code works by looking at the logs, then see the results in your browser by clicking the ‘Show Live’ button if you are using Glitch.
|
||||
<strong>Note:</strong> Be sure that your code works by looking at the logs, then see the results in the preview if you are using Repl.it.
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
|
Reference in New Issue
Block a user