Ignite JHipster

适用于 JHipster 应用程序的 React Native 样板。(A React Native boilerplate for JHipster apps)

Github星跟蹤圖

Ignite JHipster

适用于 JHipster 应用程序的React Native样板,包括身份验证、实体生成器、JDL支持、端到端测试等。

Android 上查看示例应用程序或查看在 JHipster Conf 上的演示

入门

要求

  • Node v8+
    • node -v 检查版本
  • React Native CLI setup
  • ignite-cli installed (>= v2.0.0)
    • npm install -g ignite-cli 安装
    • ignite --version 检查版本
  • Mac 用户要求要安装 CocoaPods
    • pod install 检查pod 安装
  • 不需要,但强烈建议使用,Reactotron 使调试变得更加容易并且已预先配置。

要生成应用,请运行以下命令:

ignite new SampleApp --boilerplate ignite-jhipster

回答提示,输入 JHipster 应用程序的路径,然后选择所需的任何插件。生成器将创建一个包含项目的新目录(已为 iOS 和 Android 预先配置)。

生成后,您可以使用实体生成器、JDL 导入器和其他命令。

设置

app/config/app-config.js 包含几个重要变量:

  • apiUrl:您的 JHipster 应用的 API 网址
  • appUrlScheme:您应用的网址链接用于深度链接,还分别为 iOS(Info.plist)和 Android(AndroidManifest.xml)配置了该链接。
  • uaaBaseUrl:(UAA only)如果您使用的不是 uaauaaBasePath ,请配置此变量。

Android 注意

  • 在本地为 Android 运行 JHipster 后端时,请确保运行 adb reverse tcp:8080 tcp:8080,以便该应用程序可以与您的后端通信。
  • 手动构建 Android 应用时,请在命令前添加 app:(由于 React Native Navigation)。例如:./gradlew app:bundleRelease

(The first version translated by vz on 2020.08.08)

主要指標

概覽
名稱與所有者jhipster/generator-jhipster-react-native
主編程語言EJS
編程語言JavaScript (語言數: 4)
平台Linux, Mac, Windows
許可證Apache License 2.0
所有者活动
創建於2017-03-05 02:29:20
推送於2025-06-04 18:56:35
最后一次提交2020-05-19 13:48:02
發布數134
最新版本名稱v5.4.0 (發布於 2025-04-03 20:32:08)
第一版名稱v0.0.5 (發布於 2017-03-07 00:44:14)
用户参与
星數268
關注者數17
派生數56
提交數3.1k
已啟用問題?
問題數111
打開的問題數7
拉請求數1078
打開的拉請求數35
關閉的拉請求數1034
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

JHipster React Native

NPM version
iOS-E2E
Generator
App

A React Native blueprint for JHipster apps, complete with authentication, an entity generator, JDL support, E2E tests, and more.

Check out the blog post or YouTube video for a full demo of JHipster React Native.

Docs

Getting Started

Requirements

  • Node LTS v16+
    • Verify version with node -v
  • generator-jhipster-react-native installed
    • Install with npm install -g generator-jhipster-react-native
  • eas-cli installed with npm install -g eas-cli
  • To run your app on an emulator instead of a device, follow the platform-specific instructions:
  • JHipster backend must use jwt or oauth2 for its authenticationType

Create a directory for your app:

mkdir SampleApp && cd SampleApp

To generate an app, run the following command:

# JHipster v6.x+
rnhipster

# JHipster v7+
jhipster --blueprints react-native

# JHipster v7+ JDL Application
jhipster --blueprints react-native jdl ./path-to-your-app-config.jdl

Answer the prompts:

  • Enter the path to your JHipster app
  • Choose whether to enable E2E Detox Tests

After generating, you can import entities with the entity generator and JDL importer.

Configuration

  • app/config/app-config.js contains your JHipster API URL (default: http://localhost:8080/)

CORS

  • In dev, for the Web build, add http://localhost:19006 as an allowed origin in the backend CORS config.
  • In production, you will need to enable CORS for your deployment domain.

Notes for Android

  • When running your JHipster backend locally for Android, make sure to run adb reverse tcp:8080 tcp:8080 so the app can communicate with your backend.

License

Apache-2.0 © Jon Ruddell