Coder Social home page Coder Social logo

Comments (11)

AdamBrodzinski avatar AdamBrodzinski commented on September 23, 2024

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.

tomitrescak avatar tomitrescak commented on September 23, 2024

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.

tomitrescak avatar tomitrescak commented on September 23, 2024

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.

AdamBrodzinski avatar AdamBrodzinski commented on September 23, 2024

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.

AdamBrodzinski avatar AdamBrodzinski commented on September 23, 2024

@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/ and mup intiand setup config
  • mup setup (in settings/production)
  • cd to root and run ./deploy mup

from meteor-webpack-react.

tomitrescak avatar tomitrescak commented on September 23, 2024

@AdamBrodzinski looks great! Hopefully the PR will be accepted soon and I'll test it! Thanks for this!

from meteor-webpack-react.

tomitrescak avatar tomitrescak commented on September 23, 2024

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.

rclai avatar rclai commented on September 23, 2024

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.

jedwards1211 avatar jedwards1211 commented on September 23, 2024

@rclai nope, not unless you want hot-reloading in production :)

from meteor-webpack-react.

jedwards1211 avatar jedwards1211 commented on September 23, 2024

@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.

jedwards1211 avatar jedwards1211 commented on September 23, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.