H
H
habr_user_X2021-01-24 16:45:05
Node.js
habr_user_X, 2021-01-24 16:45:05

Why does the node command open a browser?

Hello everyone, today I started to study server-side javascript node.js, well, I ran into a problem. When I write the path in cmd and write node index.js, my browser starts with the js code I wrote. I need that what I did was displayed in cmd and not in the browser. Before I started studying server js, I studied regular js and downloaded various gulpfiles, but today I deleted them all, it still didn’t help. Here the code itself is simple, did the file register the path correctly?

const chalk = require('chalk')
console.log(chalk.blue('hello nodejs'))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
habr_user_X, 2021-01-25
@habr_user_X

Hi habr_user_x try to write node index without extension and you will succeed) contact habr we will always help you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question