Often times I like to try out new things in web development and nodejs world. But there is one problem with it.
But the command to start development environment or build the project changes from one to another.
create-react-app starts development environment with
create-next-app starts development environment with
npm run dev
and so on.
and there is no one command to rule them all.
But don't worry there is one solution to it.
Here is how you can do it
Step 1: Enable
dotenv plugin in
zsh. Edit your
Now this plugin will always automatically source your
.env file everytime you cd into your project directory that contains a
Step 2: Create and add following content a
alias ns="npm start" alias nb="npm run build"
Step 3: Create and add following content a
alias ns="npm run dev" alias nb="npm run build"
Step 4: For java spring boot project you can add following
alias ns="mvn org.springframework.boot:spring-boot-maven-plugin:run"
Now when you
create-react-app project then all you need to run
ns to start project
also when you
create-next-app project then as well you need to run
ns to start the project
Thats it its just one time configuration you have to do in your project and you are done. No more remembering project specific commands. Cheers. Enjoy.