Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magentanova/generator-mpro
Yeoman generator for a full-stack Node app. Based on generator-maestro. Includes a CLI for creating schemas and REST routes.
https://github.com/magentanova/generator-mpro
generator nodejs passportjs yeoman
Last synced: 5 days ago
JSON representation
Yeoman generator for a full-stack Node app. Based on generator-maestro. Includes a CLI for creating schemas and REST routes.
- Host: GitHub
- URL: https://github.com/magentanova/generator-mpro
- Owner: magentanova
- Created: 2016-12-07T19:18:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-11T15:08:11.000Z (over 7 years ago)
- Last Synced: 2024-12-24T15:35:08.129Z (about 1 month ago)
- Topics: generator, nodejs, passportjs, yeoman
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# generator-mpro
## About
mPro is a code generator (run from the command line) that scaffolds out a full-stack MERN (Mongo Express React Node) app. It's an extension of a similar tool, Maestro, documented at [maestrodocs.com](http://maestrodocs.com).
Besides some extra scaffolding, the main addition of mPro is a very nifty command-line tool that will automatically build out a database schema and REST api routes for a given data model. It will connect these features to each other and to your server.
## Usage
### Installation
Installs of MongoDB, npm etc are assumed.
- Install Yeoman with `npm install -g yo`
- Install the mPro generator with `npm install -g mpro`
- Follow the prompts, then `cd` into the project you've created.
- Commands for watching source files and running the server are detailed [here](http://maestrodocs.com/#workflow).
### Creating Data Models
- From within your project folder, run `yo mpro:makeModel [YOUR MODEL NAME]`
- The created files can be found in `db/schemas` and `routes/api`
- You might want to elaborate on the very basic schema that was written, but from there, you're ready to start writing front-end code that talks to your api.
For example, if I run `yo mpro:makeModel artListing`, mPro will create `db/schemas/artListing.js` and `routes/api/artListing.js`. CRUD requests can now be made to your server at `YOUR-APP-DOMAIN/api/artListing`.