Ignite JHipster

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

Github stars Tracking Chart

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)

Overview

Name With Ownerjhipster/generator-jhipster-react-native
Primary LanguageEJS
Program languageJavaScript (Language Count: 4)
PlatformLinux, Mac, Windows
License:Apache License 2.0
Release Count129
Last Release Namev4.4.0 (Posted on )
First Release Namev0.0.5 (Posted on 2017-03-07 00:44:14)
Created At2017-03-05 02:29:20
Pushed At2024-05-01 21:05:50
Last Commit At2020-05-19 13:48:02
Stargazers Count258
Watchers Count18
Fork Count53
Commits Count2.6k
Has Issues Enabled
Issues Count99
Issue Open Count5
Pull Requests Count845
Pull Requests Open Count11
Pull Requests Close Count778
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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

To the top