Code Monkey home page Code Monkey logo

Comments (8)

fiveisprime avatar fiveisprime commented on May 17, 2024

For production meteor applications (when the NODE_ENV is set to 'production' - this is set by default on Modulus), you can use the METEOR_SETTINGS environment variable to expose these settings to the application.

If you are using Modulus, you can run $ modulus env set METEOR_SETTINGS "$(cat settings.json)" in the Modulus CLI to set the environment variable using your existing settings.json file (be sure to restart your application after setting the variable).

from demeteorizer.

pociej avatar pociej commented on May 17, 2024

im sure that doing something wrong. When i demeteorized i didnt have seting.json in .demeteorized
dir. SO i copied file and ran what ypu suggest. I have error :
Error: Settings are not valid JSON
at packages/meteor/server_environment.js:11
at packages/meteor.js:184:4
at packages/meteor.js:1170:3
at /mnt/data/2/programs/server/boot.js:155:10
at Array.forEach (native)
at Function..each..forEach (/mnt/data/2/node_modules/underscore/underscore.js:79:11)
at /mnt/data/2/programs/server/boot.js:82:5
[2014-01-14T15:49:11.450Z] Application CRASH detected. Exit code 8.
[2014-01-14T15:49:13.248Z] Application restarted.

any idea?

from demeteorizer.

fiveisprime avatar fiveisprime commented on May 17, 2024

Would you mind jumping into the #Modulus IRC channel? http://irc-5518.onmodulus.net

from demeteorizer.

fiveisprime avatar fiveisprime commented on May 17, 2024

Sorry about that, looks like wrapping the results of the cat command will make this work correctly: $ modulus env set METEOR_SETTINGS "$(cat settings.json)".

👍

from demeteorizer.

pociej avatar pociej commented on May 17, 2024

still the same error
:(

from demeteorizer.

fiveisprime avatar fiveisprime commented on May 17, 2024

Your JSON appears to be incomplete - the closing braces are missing from the variable. It might be easier to just hand edit the value in the administration section of your project on the web portal.

from demeteorizer.

richpowell avatar richpowell commented on May 17, 2024

you have to be in the directory of the settings file when you run modulus env set METEOR_SETTINGS "$(cat settings.json)"

from demeteorizer.

rclai avatar rclai commented on May 17, 2024

I don't see demeteorizer including the settings.json (it is valid json) file into the root folder of the app, can you guys include that?

from demeteorizer.

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.