A command-line tool for generating and managing Node.js backend projects.
Nodepsy helps you quickly create Node.js backend applications with Express and MongoDB. It provides commands for generating APIs, managing authentication, and handling deployments.
# Install globally
npm install -g nodepsy
# Create a new project
nodepsy new my-api
# Navigate to project
cd my-api
# Install dependencies
npm install
# Start the server
npm start- Node.js & Express.js
- MongoDB with Mongoose
- JWT Authentication
- Docker support
- GitHub Actions CI/CD
- Node project scaffolding
- API generation
- User management
- Database models
- Deployment tools
- Node.js >= 14
- MongoDB (for local development)
npm install -g nodepsyCreates a new Node.js project with Express and MongoDB setup.
nodepsy new my-project
nodepsy new my-api --stack node-mongoOptions:
--stack: Technology stack to use (default: node-mongo)
Generates API endpoints with controllers and routes.
nodepsy generate api users --crud
nodepsy generate api products --graphqlOptions:
--crud: Generate CRUD endpoints--graphql: Generate GraphQL API (coming soon)
Creates Mongoose models with specified fields.
nodepsy add model user --fields "name:String, email:String"
nodepsy add model product --fields "title:String, price:Number, inStock:Boolean"Supported field types:
- String
- Number
- Boolean
- Date
- ObjectId
JWT token management and mock user generation.
nodepsy auth generate --user admin
nodepsy auth verify <token>
nodepsy auth mock --count 10Configure environment variables and deployment settings.
nodepsy env set MONGODB_URI=mongodb://localhost:27017
nodepsy deploy --platform heroku
nodepsy setup ci --githubGenerated project structure and file organization.
my-project/
├── src/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── middleware/
│ ├── config/
│ └── app.js
├── tests/
├── package.json
└── .env
When using the --crud option, the following endpoints are created:
GET /api/resource # List all resources
GET /api/resource/:id # Get single resource
POST /api/resource # Create resource
PUT /api/resource/:id # Update resource
DELETE /api/resource/:id # Delete resource
- MongoDB Connection: Ensure MongoDB is running locally or update MONGODB_URI
- Port Conflict: Change PORT in .env if 3000 is in use
- Dependencies: Run
npm installafter generating new components
Error: Cannot find module: Runnpm installin project directoryMongoError: connect ECONNREFUSED: Start MongoDB service
Contributions are welcome! Please check our contributing guidelines.
MIT