nomstart
v0.0.1
Published
nomistart simplifies the setup of Express and MongoDB projects, automating folder creation, file generation, and dependency installation for a smoother start.
Downloads
3
Maintainers
Readme
nomstart 🚀
Welcome to nomstart—your ultimate sidekick for setting up Express and MongoDB projects! If you’re fed up with the tedium of manually creating folders, writing boilerplate code, and installing dependencies, nomstart is here to streamline the process and save you time.
With just a few simple commands, nomstart gets your Node.js project off to a fantastic start with a clean and organized structure. Bid farewell to repetitive setup tasks and dive straight into coding!
What nomstart does
- 🎯 Organizes Your Project: Creates a well-structured folder layout specifically for Express and MongoDB applications.
- 🛠️ Generates Key Files: Sets up essential files like
.env
andindex.js
to kickstart your development. - 📦 Installs Dependencies: Automatically installs crucial dependencies (
dotenv
,express
,mongoose
,cors
) and development tools (nodemon
). - 🔧 Updates package.json: Adds useful scripts for both development and production environments.
How to Get Started
Install nomstart Globally:
First things first—install nomstart globally so you can use it from anywhere:
npm install -g nomstart
Initialize Your Node.js Project:
If you haven’t set up your Node.js project yet, start by running:
npm init -y
This will create a
package.json
file that nomstart will work its magic on.Run nomstart:
Ready to get started? Use the following command to generate your boilerplate and install dependencies:
npx nomstart
Here’s the folder structure you’ll get:
├── src │ ├── config │ │ └── db.js │ ├── controllers │ │ └── userController.js │ ├── models │ │ └── userModel.js │ └── routes │ └── userRoutes.js ├── .env ├── index.js └── package.json
- .env: Your configuration hub for environment variables such as
PORT
,MONGO_URI
, andFRONTEND_URL
. - index.js: The core of your application, setting up Express and connecting to MongoDB.
- src/routes/userRoutes.js: Where your API routes are defined.
- src/controllers/userController.js: Contains the logic for your routes.
- src/models/userModel.js: Defines your MongoDB schema.
- src/config/db.js: Manages your MongoDB connection.
- .env: Your configuration hub for environment variables such as
Start Coding:
You’re all set to start coding! Use these commands to run your project:
Start in production mode:
npm start
Start in development mode with live reloading:
npm run dev
License
nomstart is licensed under the MIT License. Feel free to check out the LICENSE file for all the details.
Enjoy coding with nomstart! 🚀