Extra practice for Async functions
-
Fork and clone this project.
-
In your terminal, navigate to the project directory.
-
Install the project dependencies.
$ npm install
-
In your terminal, navigate to the project directory.
-
Open the project in VS Code
$ code .
-
Make edits to the
src/index.js
file. -
Run the REPL.
-
In the terminal from the project directory, run the following command:
$ node src/index.js
Or
$ npm start
-
Or from VS Code, install the Code Runner extension and run the file by clicking the play button in the top right corner of the editor.
- Repeat steps 3-4 as needed.
The project is configured to use ESLint to provide syntax warnings. ESLint can be run from the project directory using the following command:
$ npm run lint
ESLint warnings can be shown in VS Code by installing the ESLint extension.
Additional files can be added to the src
directory and then run from the project directory as
$ node src/<filename>.js
Generally, we can run a file by using the command
$ node path/to/file.js
Where path/to/file.js
is the path to the file we want to run relative to the current directory.