Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ After post-editing it resulted in a complete starter repo. 🤩

## About

Meteor and React Native are not integrated with each other by default.
However, there are great packages out there, that help us to make them integrate.
Meteor and React Native are not integrated with each other by default.
However, there are great packages out there, that help us to make them integrate.
The best is, it's actually not that difficult!

This starter brings the most basic integration for a Meteor project as a backend for your react native app.
Expand All @@ -26,7 +26,7 @@ Just follow the instructions in this readme to get startet immediately.

## Installation

You need to have Meteor installed on your system.
You need to have Meteor installed on your system.
Follow the Meteor installation instructions on [the Meteor website](https://meteor.com).

### Create a new project from this template repo
Expand All @@ -39,7 +39,7 @@ If you want to clone it directly, you can do it via
$ git clone [email protected]:jankapunkt/meteor-react-native-starter.git
```

### Install and run the Meteor backend
### Install and run the Meteor backend (headless)

```bash
$ cd backend
Expand All @@ -53,6 +53,20 @@ The backend will install and start. If everything went fine, you should see the
=> App running at: http://localhost:8000/
```

### Alternate backend (with UI)

With thanks to [@fredmaiaarantes](https://github.com/fredmaiaarantes), we have transplanted a Meteor 3.1 "To do" app that shares data with the React Native mobile app.

![Task Form](fm-backend/README-Assets/task_example.png)

You can see how the UI updates instantly between the mobile app and the browser

```bash
$ cd fm-backend
$ meteor npm install
$ meteor npm run start
```

## Install and run the mobile app

Open a **new terminal** in order to install and run the app.
Expand All @@ -79,7 +93,7 @@ in order to make the RN app connect. The Meteor-typical `localhost` will not wor
First, get your local ip via

| os | command |
|---------|----------------|
| ------- | -------------- |
| Linux | `ip addr show` |
| MaxOs | `ifconfig` |
| Windows | `ipconfig` |
Expand Down Expand Up @@ -121,7 +135,8 @@ If you still prefer an emulator, please install them on your own behalf.

This project comes with a builtin test-stack for backend and app!

The backend uses
The backend uses

- `meteortesting:mocha` as test runner
- `chai` as assertion lib
- `sinon` for stubs
Expand All @@ -130,6 +145,7 @@ The backend uses
- `standardx` with some teaks as linter (basically eslint)

The app uses

- `jest` as test runner and assertion lib
- `standardx` with some teaks as linter (basically eslint)

Expand All @@ -142,7 +158,7 @@ To generate docs you can use the respective npm scripts in backend and app.

## Get involved

You liked this workshop or used this repo as a starter?
You liked this workshop or used this repo as a starter?
Please leave a star and help by contributing to [@meteorrn/core](https://github.com/meteorrn/meteor-react-native).

If you find issues within the code, please leave an issue.
Expand Down
2 changes: 1 addition & 1 deletion app/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = 'app'
rootProject.name = 'todo'

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle");
useExpoModules()
Expand Down
8 changes: 3 additions & 5 deletions app/app.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"expo": {
"name": "app",
"slug": "app",
"name": "todo",
"slug": "to-do",
"version": "1.0.0",
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"jsEngine": "hermes"
}
}
2 changes: 1 addition & 1 deletion app/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"backend": {
"url": "ws://192.168.178.46:8000/websocket"
"url": "ws://192.168.1.100:8000/websocket"
}
}
2 changes: 1 addition & 1 deletion app/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ platform :ios, podfile_properties['ios.deploymentTarget'] || '12.4'
install! 'cocoapods',
:deterministic_uuids => false

target 'app' do
target 'todo' do
use_expo_modules!
config = use_native_modules!

Expand Down
Loading
Loading