Skip to content

Mongoose, Express, Angular e Nodejs generator with OpenAPI3 that generates the frontend and JSONSchema to generate the backend

Notifications You must be signed in to change notification settings

mariohmol/mean-crud-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mean-crud-generator

Mongoose, Express, Angular e Nodejs generator with OpenAPI3 that generates the frontend and JSONSchema to generate the backend

  1. Frontend: Create your Open API 3 schema using swagger editor
  2. Backend: Create a JSONSchema for your data (or Generate from Open API Schema) using the JSON Schema Editor

All the endpoints, docs, mongo schemas, express and Angular CRUD components ready to use!

Live Example

Base on this Open API Schema example and this JSON Schema example , it created the backend and docs:

Run this project

Fork and clone to your computer, then do npm i.

Run npm run dev than you can see the demo project using the Pet Swagger example:

http://localhost:8080/docs

See how to start one app, this is your JS code:

import express from 'express';
import { BaseApp , startMeanCrudServer } from 'mean-crud-generator';

// Create your own app express
let app = express();

// or use our Base App
app = BaseApp;

// Provide your app and the directory with the Open API Schemas and JSONSchemas
startMeanCrudServer(app, __dirname)
.then(()=>{
    app.listen(8080, () => {
        console.log(`Listen to port ${8080}`);
    });
});

Then create a Open API File like this Demo Open APi using the Swagger Editor.

And if want to specife your data schema, make like this JSONSchema example with JSONSchema Editor.

After running this app you can access:

  • API DOCS: http://localhost:8080/docs
  • API: http://localhost:8080/api
  • APP: http://localhost:8080/app

References

Editors

Links

Model

Repo example mongood jsonschem working:

Frontend

Install

npm install -g swagger

TODO

About

Mongoose, Express, Angular e Nodejs generator with OpenAPI3 that generates the frontend and JSONSchema to generate the backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published