Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
generator-jhipster-nodejs
Advanced tools
A NodeJS blueprint that creates the backend using NodeJS with NestJS framework
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.
Demo
The UI is inherited from standard JHipster app client. So only backend generation changes. For this, a live app running is less useful than the code and the app structure shows in:
- The sample repo app with React client and Okta OAuth2
- The sample repo app with Angular client and JWT auth
- The sample repo app with Vue.js client and mongodb
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. But from the 1.5.0 release you can choose mongodb that uses a memory version for dev/test
- The app uses TypeORM and asks you a question for another sql db or for mongodb
- 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 choice, the Angular/React client with the home page set for NHipster and CRUD operations for entity generated with subgenerator and jdl import
A previous of a jwt auth app:
As this is a JHipster blueprint, we expect you have JHipster and its related tools already installed:
Please attention to install that node.js version!!
yeoman
and jhipster
are installed.npm install -g generator-jhipster-nodejs
nhipster
To install this blueprint:
npm install -g generator-jhipster-nodejs
To update this blueprint:
npm update -g generator-jhipster-nodejs
To install this blueprint:
yarn global add generator-jhipster-nodejs
To update this blueprint:
yarn global upgrade generator-jhipster-nodejs
This is a blueprint that is runnable by:
jhipster --blueprints nodejs
However, it also ships with an nhipster
CLI that you can use as a shortcut.
✅ General App generation
nhipster
✅ Controller generation
nhipster spring-controller <controller-name>
✅ Service generation
nhipster spring-service <service-name>
✅ Entity generation
nhipster entity <entity-name>
✅ JDL Entity model support generation
nhipster import-jdl my_file.jdl
✅ Ci-cd generation
nhipster ci-cd
For the last, in the test-integration/samples/FOLDER_NAME-jdl there are some examples of jdl models.
mkdir docker
cd docker
wget https://github.com/jhipster/generator-jhipster-nodejs/raw/master/docker/Dockerfile
docker build -t jhipster-generator-nodejs:latest .
mkdir app
cd app
docker run -it --rm -v $PWD:/home/jhipster/app jhipster-generator-nodejs
docker run -it --rm -v $PWD:/home/jhipster/app jhipster-generator-nodejs /bin/bash
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
$ git checkout v7.0.0
$ 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:
nhipster
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.
Thanks goes to these wonderful people:
Angelo Manganiello (founder stream lead) | Hadi Rasouli | Iván García Sainz-Aja | Daniel Franco | Ed Pham | Markus |
Apache-2.0 © Angelo Manganiello
FAQs
A NodeJS blueprint that creates the backend using NodeJS with NestJS framework
The npm package generator-jhipster-nodejs receives a total of 163 weekly downloads. As such, generator-jhipster-nodejs popularity was classified as not popular.
We found that generator-jhipster-nodejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.