Comments (11)
I imagine all will be the same with 1.2 with the exception of being able to opt out of Blaze and use the static-html package.
Also, how do I deploy my meteor app?
Ah so this is bit confusing now. Basically you need to run ./prod
let it build, then kill the watcher with ctrl-c
. You could also modify your .prod
script so that it removes the --watch
commands and doesn't boot up meteor.
Then you can just meteor deploy
or with MUP you can create mup.json
in the root, then setup the app
directory to point to meteor_core
and then from the root just mup setup/deploy
.
However if you're using settings.json in the app I think it looks for settings.json
in the same directory. If you have multiple environments (staging/prod) you might need to rename the current settings file or symlink them into another folder.
I'm hoping to have some free time this weekend to make a deploy script.
from meteor-webpack-react.
Adam, good news ;) I'll wait for the script, or if you need help just let me know if I can do something about it. Just so you know, I have almost finished swith of all our uni applications to this solution. The biggest pain was to rewrite the whole frontend to react, but doing so I managed to improve the whole thing tremedously ... and you gotta love the code patching ;) One possible improvement would be, that if change in code cannot be handled by code patching an automatic page refresh could be performed .. but pressing CMD + R is not an issue.
from meteor-webpack-react.
Hello @AdamBrodzinski Any progress on this? I tried what you proposed, but am getting a blank screen. I need to test the environment variables if they are propaerly set, as with the devel version it's not going well.
from meteor-webpack-react.
I'm going to try to do this tonight (trying to keep my eyes above water lol). I've deployed to meteor.com and modulus so far with no issues. If you're using MUP then you'll have to configure env vars and package.json a bit differently (it'll look for a file called package.json in the same dir as mup.json)
from meteor-webpack-react.
@tomitrescak I just pushed PR #59 to add support for modulus, meteor.com, mup (partially) and demeteorizer (for custom/local servers).
Once setup you can just run deploy mup
and be done. Mup requires a bit of configuration compared to modulus or meteor.com deploy.
Now when you run build it will just build the web app into meteor_core, then run deploy with an argument to choose the service to deploy to (case statement needs modified for your app name).
For package.json support with MUP they need to be renames and moved into the same dir as the mup.json file, see your other issue to resolve this. Once that is done then mup willl work. So:
- copy settings/prod.json to settings/production/settings.json
- cd into
settings/production/
andmup inti
and setup config mup setup
(in settings/production)- cd to root and run
./deploy mup
from meteor-webpack-react.
@AdamBrodzinski looks great! Hopefully the PR will be accepted soon and I'll test it! Thanks for this!
from meteor-webpack-react.
Hmm, I think you missed a cd
command before deploy, otherwise mup cannot find the mup init and all
"mup" )
echo "Make sure to mup init and mup setup before first deploy"
# you will also need to move settings/prod.json to settings/prod/settings.json
# then mup init inside settings/prod/ so that mup uses the new settings.json
# this will require a settings path change in ./dev script
cd settings/prod
mup deploy
;;
from meteor-webpack-react.
If you're doing lazy-loading of styles and components, do you need to have a webpack server running on your production server too?
from meteor-webpack-react.
@rclai nope, not unless you want hot-reloading in production :)
from meteor-webpack-react.
@tomitrescak in the shelljs
script now it just goes to meteor_core
and calls mup deploy
. But I could eventually put the settings.json
paths in variables so that it's easier to move things around for mup
from meteor-webpack-react.
@rclai I don't know all the details of how lazy loading works, but I'm pretty sure that for an async require (has to be async for code splitting), the Webpack output checks that the chunk containing the required module is loaded, and if not just makes a simple ajax request for that chunk. Once that chunk is loaded it passes it to the async require callback
from meteor-webpack-react.
Related Issues (20)
- Stripe integration HOT 1
- Calling configure method of useraccounts package causes error HOT 2
- WebPack Syntax Error on Windows
- Why would dev.js build server only?? HOT 2
- CoffeeScript/ Usage with meteord HOT 2
- How to: Server side debugging? HOT 2
- npm WARN deprecated [email protected]: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0 npm WARN deprecated [email protected]: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0 HOT 3
- TypeError: Cannot read property 'loginButtons' of undefined HOT 4
- Screen stays at "Loading" HOT 2
- mailgun-js HOT 2
- Meteor 1.3 HOT 18
- Adding loaders to webpack.config.client.js HOT 2
- Code splitting doesn't work in production (because only main chunk gets copied to meteor folder) HOT 12
- Cannot import meteor modules HOT 1
- Problem using Elasticsearch HOT 4
- Weird debug issues -- out of the box HOT 1
- [ERROR] Cannot find Cannot find module 'temp' , core-js-no-number when running dev HOT 2
- GET http://localhost:9090/ 502 Bad Gateway HOT 6
- Trying to bundle a pure node.js application HOT 2
- Webpack issue loading static files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-webpack-react.