generator-jhipster-nodejs
Generator-jhipster-nodejs, the official NodeJS blueprint that uses NestJS Typescript Framework for your backend. We encourage you to use it and give us your feedback.
Notes
For the features of the last release refers to CHANGELOG.md.
Greetings, nodejs Hipster!
This project adds nodejs for your backend, all typescript files generation, not JAVA!, to the JHipster application 😎. It is based on JHipster Blueprint 🔵, that is meant to be used in a JHipster application.
The generator applies this standard configuration for the nodeJS app:
- NestJS base app with web controllers, swagger doc and jwt or oauth2 passport auth services
- The app starts with four seed users (admin, basic user and anonymous roles), as standard jhipster monolithic app, with SQLite for dev and configurable sql db for prod
- The app uses typeORM and asks you a question if you don't want SQLite database in prod mode but using onother sql db
- TypeORM is also used for the automatically migration and versioning of the database scripts
- The app runs also as a full stack app including, for the monolitich choise, the angular/react client with the home page set for NHipster and CRUD operations for entity generated with subgenerator and jdl import
A generated example app with JWT auth is here
A generated example app with Okta Oauth2 is here
Prerequisites
As this is a JHipster blueprint, we expect you have JHipster and its related tools already installed:
🚀 How to get started
- Make sure you have followed the JHipster installation guide and that both
yeoman
andjhipster
are installed. - Install the package with
npm install -g generator-jhipster-nodejs
- And generate the application with
jhipster --blueprints nodejs
Installation Details
With NPM
To install this blueprint:
npm install -g generator-jhipster-nodejs
To update this blueprint:
npm update -g generator-jhipster-nodejs
With Yarn
To install this blueprint:
yarn global add generator-jhipster-nodejs
To update this blueprint:
yarn global upgrade generator-jhipster-nodejs
🚦 What we have now
✅ General App generation
jhipster --blueprints nodejs
✅ Controller generation
jhipster spring-controller <controller-name> --blueprints nodejs
✅ Entity generation
jhipster entity <entity-name> --blueprints nodejs
✅ JDL Entity model support generation
jhipster import-jdl my_file.jdl --blueprints nodejs
For the last, in the test-integration/samples/FOLDER_NAME-jdl there are some examples of jdl models.
Please attention that SQLite does not support enum
🛠 Steps to develop a generator feature and test it
Shell steps:
git clone https://github.com/jhipster/generator-jhipster-nodejs.git
cd generator-jhipster-nodejs
git checkout -b feature/my-feature
npm install
npm link
cd ..
git clone https://github.com/jhipster/generator-jhipster.git
cd generator-jhipster
npm install
npm link
cd ..
mkdir test-generation
cd test-generation
npm link generator-jhipster
npm link generator-jhipster-nodejs
Now you will develop under the generator-jhipster-nodejs that you have cloned with git. After finish, to generate the app and check your feature, run in test-generation folder:
jhipster --blueprints nodejs
❤️ For community
Found an issue, check if is already opened or closed, otherwise open a new feature or bug.
Interested in contributing, check out our contributing guide to get started.
Refer for contribution to roadmap or to kanban board.
Any questions Angelo Manganiello.
Contributors ✨
Thanks goes to these wonderful people:
Angelo Manganiello (founder stream lead) | Hadi Rasouli | Iván García Sainz-Aja | Daniel Franco |
Special Thanks
License
Apache-2.0 © Angelo Manganiello