
StartupJS is a full-stack framework that consists of:
StartupJS app requires: Node 14.x, Yarn, MongoDB 4.x, Redis 5.x
Alternatively, you can run everything in Docker, in which case follow Docker development Quick Start. Important to note is that Docker won't allow you to test Android or iOS.
Initialize a default ui template project, change myapp to your project name (use lower case):
npx startupjs init myapp
Go into the created project folder and start the web application with:
yarn start
Open http://localhost:3000 and start developing!
Follow the React Native guide to setup everything.
StartupJS uses native modules, so you have to follow React Native CLI Quickstart, not the Expo guide.
yarn start actually combines 2 commands together: yarn server and yarn web.
In order to develop your app on mobile, you'll have to open a bunch of tabs anyways, so it makes sense
to also run server and web separately instead of using the yarn start.
Here is the list of commands to run all platforms at the same time:
Start server (required) in a separate terminal tab
yarn server
Start web (optional) in a separate terminal tab
yarn web
Start metro (required for Android and/or iOS) in a separate terminal tab
yarn metro
Run android (optional) in a separate terminal tab
yarn android
Run ios (optional) in a separate terminal tab
yarn ios
vscode-react-pugESLintlanguage-babel in atompug:source.pugCore settings of atom.Use Tree Sitter Parserslinter-eslintThe main things you'll need to know to get started with StartupJS are:
MODELS section, ignore everything else.For additional documentation on each StartupJS package see the according readme:
To gain further deep knowledge of StartupJS stack you'll need get familiar with the following technologies it's built on:
main and admin)The following templates are available:
simplerouting - plugs in @startupjs/app which provides a react-router routing implementationui (default) - plugs in routing and @startupjs/uiBy default init creates a project using the feature-rich ui template.
To use another template specify the -t option:
npx startupjs init myapp -t simple
To create a new project using an alpha version of startupjs, append @next to the startupjs itself:
npx startupjs@next init myapp
Each template initializes on top of a default react-native init application.
If you want to use an RC version (next) of react-native, specify it using the -rn option:
npx startupjs init myapp -rn next
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 ui boilerplate project. Change myapp at the end to your project name (use lower case).
docker run --rm -it -v ${PWD}:/ws:delegated startupjs/dev init myapp
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 start developing!
When you want to open an additional terminal window, you can quickly exec into the running container using:
./docker exec
The following guides are available to assist with migration to new major versions of StartupJS:
You can configure your project to use vite in development for build process.
yarn add [email protected] vite-plugin-startupjs
And add the execution of vite patch to your postinstall script in package.json:
"postinstall": "startupjs postinstall && npx patch-package --patch-dir ./node_modules/@startupjs/patches/vite"
Note that the vite version is required to be the outdated 0.20.3. lUpgrade to the latest vite version is planned to be done soon.
See CONTRIBUTING.md
MIT
© Pavel Zhukov
Content type
Image
Digest
Size
1 GB
Last updated
over 5 years ago
docker pull startupjs/deploy