StartupJS
React Native + Web + Node.js full-stack framework
Requirements
- Node >= 12.0
- Yarn
- MongoDB 4.0
- Redis 5.0
OR
- Docker (See Docker development section for details)
Quick start
- Initialize a new boilerplate project. Change
myapp
to your project name (use lower case)
npx startupjs init myapp --version=latest && cd myapp
- Start server (in a separate terminal tab)
yarn server
- Start web (in a separate terminal tab). Open
http://localhost:3000
yarn web
- Start metro, if you want to develop native iOS or Android apps (in a separate terminal tab)
yarn metro
- Run android (in a separate terminal tab)
yarn android
- Run ios (in a separate terminal tab)
yarn ios
Docker development
Alternatively you can run a docker development image which has node, yarn, mongo and redis already built in.
You only need docker
for this. And it works everywhere -- Windows, MacOS, Linux.
Keep in mind though that since docker uses its own driver to mount folders,
performance (especially when installing modules) might be considerably slower compared
to the native installation when working with the large amount of files.
- Initialize a new project (change
awesomeapp
at the end to your app name):
docker run --rm -it -v ${PWD}:/ws:delegated startupjs/dev init awesomeapp
- Go into the created project folder. Then run the development docker container with:
./docker
- While inside the running container, start your app with:
yarn start
Open http://localhost:3000
and you should see your app.
- You can quickly exec into the running container from another terminal window using:
./docker exec
Packages