This is the final code repository for our workshop "Meteor and React Native" at Meteor Impact 2022. It has been post-edited to create a complete starter repository.
Meteor and React Native are not integrated by default, but there are packages available that help with the integration. This starter provides basic integration for using Meteor as a backend for your React Native app. Just follow the instructions in this readme to get started immediately.
To use this starter, you need to have Meteor installed on your system. Follow the installation instructions on the Meteor website. Once Meteor is installed, you can create a new project from this template repository or clone it directly.
$ git clone email@example.com:jankapunkt/meteor-react-native-starter.git
After cloning, you can install and run the Meteor backend by navigating to the 'backend' directory:
$ cd backend $ meteor npm install $ meteor npm run start
The backend will be installed and started. If everything goes well, you should see the following message:
=> App running at: http://localhost:8000/
Next, install and run the mobile app by opening a new terminal and navigating to the 'app' directory:
$ cd app $ meteor npm install $ meteor npm run start
If prompted, install expo-cli. If the app fails to build, manually install expo-cli by running:
$ meteor npm install -g expo-cli
To connect your mobile app to the backend, you need to replace the 'xxx.xxx.xxx.xxx' pattern with your local IP address in the 'app/config.json' file. Then run your app again:
$ cd app && meteor npm run start
Make sure the 'app/.expo/settings.json' file looks as shown above.
Expo Go allows you to build and test your app without further configuration or emulators. It supports cross-platform development for Android and iOS. If you prefer using an emulator, please install it separately.
This project includes a test suite for both the backend and the app. The backend uses Mocha as the test runner, Chai for assertions, Sinon for stubs, hwillson:stub-collections for stubbing MongoDB collections, lmieulet:meteor-coverage for coverage, and standardx as a linter. The app uses Jest as the test runner and assertion library, and standardx as a linter.
This repository uses JSDoc to generate API documentation for the backend and app. You can find the current API docs in the 'docs' folder. Use the respective npm scripts in the 'backend' and 'app' directories to generate the docs.
If you found this workshop helpful or used this repository as a starter, please leave a star and consider contributing to @meteorrn/core. If you encounter any issues or have questions, feel free to open an issue or submit a pull request.
This project is licensed under the MIT license. See the LICENSE file for details.