- MERN Quick Start Guide
- Eddy Wilson Iriarte Koroliova
- 97字
- 2021-06-25 21:30:11
How to do it...
- Open a new Terminal
- Change the current directory to where your newly created project folder is located
- Run the following line to install the chalk package:
npm --save-exact install chalk
Now, you will be able to use the package in your project via require in Node.js. Go through the following steps to see how you can use it:
- Create a new file named index.js and add the following code:
const chalk = require('chalk') const { red, blue } = chalk console.log(red('hello'), blue('world!'))
- Then, open a new Terminal and run the following:
node index.js