improvd handling of env vars for node server