How to start node server and export NODE_PATH (with npm start or inline command)
set NODE_PATH=./ ; && node server.js
On Windows, the command above works fine. And in general, it should work without a semicolon when you set environment variables. But here, probably, path string causes the problem?
Also notice that you should set environment variables in a different way for Linux, no set
keyword must be used. If your scripts will be run on a different platform, probably it's better to use some plugin like cross-env to write your scripts.
This question helps Setting an environment variable before a command in Bash is not working for the second command in a pipe