Answer the question
In order to leave comments, you need to log in
How to enable NODE_ENV in index.html?
I use vue-cli
If in main.js I write something like
process.env.NODE_ENV === 'development' ? 'one' : 'two'
, then everything works. Answer the question
In order to leave comments, you need to log in
What programming language?Python, PHP, taking into account the "web" section.
The following question also arises: what languages programs can be embedded on a web page so that people can use this program simply by going through the site?The language that can be embedded directly on a web page, in general, is JavaScript, but almost all the sites that you see generate pages on the server and give it to you (in the sense of the browser / client) in a ready-made form, and JavaScript is usually serves as an additional language that runs already "on top" of the generated page, although in some cases it may just as well run on the server (ie serve as a server language).
Do the server part in php, do the front in vue (js) - thanks to this, the back will be understandable and easily maintained, and the front can still be ported to mobile. Thus, you can learn two languages at once.
Variable from JS in html file?
Use template engines, then there will be such an option
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question