create-stride-app
v0.0.4
Published
Get a Stride app up and running in a few clicks.
Readme
create-stride-app
Inspired by create-react-app, this gives you a great Stride app development and deployment experience out of the box.
Usage
$ yarn create stride-app my-app
$ cd my-app
$ npm start
# npm also supported
$ npm install -g create-stride-app && create-stride-app my-appFeatures
- Automatic ngrok tunnel setup - injects ngrok URL into your app descriptor automatically and also updates your app on
developer.atlassian.comduring startup so you don't have to copy your ngrok URL each time (development mode only) - Express server set up out of the box with helpful security and logging middleware, and sensible mdefault routes (healthcheck, installed webhooks, etc) that can be overridden.
- Transpiles all your server code in
src/routes/*.js - Transpiles all your frontend code in
src/client/*.js(supports React and Flow) - Watches your files and recompiles automatically
- Each
stride-scripts buildcommand produces an optimized production build of your app
Development
To run in dev mode, just npm run start. This will compile your code, set up the Express server and ngrok tunnel, and watch for changes.
You should set the APP_CLIENT_ID and APP_CLIENT_SECRET environment variables, which are available at https://developer.atlassian.com/apps
APP_CLIENT_ID=... APP_CLIENT_SECRET=... npm run startAutomatically updating app listing with ngrok URL
It can be tedious to update developer.atlassian.com with your new ngrok URL each time you run npm start, so create-stride-app has an opt-in feature which will do it for you!
Just set the following environment variables:
APP_ID_DEV- get this fromhttps://developer.atlassian.com/apps/<app-id>(make sure it's your development app not your prod app!)DAC_ATL_SESSION_COOKIE- get this from theatl_sessioncookie set after you're logged in to developer.atlassian.com
Production
Once you're ready to deploy, just npm run build to produce an optimized /build directory with everything you need to deploy.
Todo
- CSS/Less import support
- Jest support
