Giter VIP home page Giter VIP logo

razzle-heroku's Introduction

razzle-heroku Build Status

Make razzle work on heroku seamlessly.

Quickstart ๐Ÿš€

  1. Install razzle-heroku (npm i -S razzle-heroku or yarn add razzle-heroku)
  2. Create a razzle.config.js in your project root
module.exports = {
  modify: require("razzle-heroku"),
}

For more details, you can check this commit :)

Features

  • Allow your server to read environment variables at runtime. Client environment variables still need to be prefixed by RAZZLE_
  • Bind the $PORT at runtime
  • Fix RAZZLE_PUBLIC_DIR on heroku

razzle-heroku's People

Contributors

mrwade avatar xouabita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

razzle-heroku's Issues

How to use in the finished config?


module.exports = {
  modify: (config, { target, dev }, webpack) => {
    
    config.resolve = {
      ...config.resolve,
      alias: {
        '@pages': path.resolve(__dirname, 'src/pages'),
        '@features': path.resolve(__dirname, 'src/features'),
        '@ui': path.resolve(__dirname, 'src/ui'),
      } 
    };
    return config;
  }
};

Object.entries is not a function

Default node version on Heroku is 6.11.3, unfortunately it does not include Object.entries.
Upgrading node version in package.json solves the problem but it might be confusing to newcomers.

Cannot convert undefined to null to object

I'm getting this error Cannot convert undefined to null to object

it seems to fail in this line

entries(definitions['process.env']).forEach(writeDefs);

definitions['process.env'] is undefined

definitions has this value

{
'process.env.NODE_ENV': '"production"',
  'process.env.PORT': '3000',
  'process.env.VERBOSE': 'false',
  'process.env.HOST': '"localhost"',
}

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.