GithubHelp home page GithubHelp logo

Comments (6)

dvdzkwsk avatar dvdzkwsk commented on April 19, 2024

Sorry if this is a bit confusing, the file in ~/dist/server is not actually the server, it's the React application compiled for consumption by the server (see #61).

What you're probably looking for is the script in ~/bin/server, which you can run with npm server:start. Let me know if that doesn't fix things.

from react-redux-starter-kit.

jmarlow4 avatar jmarlow4 commented on April 19, 2024

That worked! But I get redux-devtools popping up with it and that shouldn't be there in production. Is that supposed to be there?

from react-redux-starter-kit.

dvdzkwsk avatar dvdzkwsk commented on April 19, 2024

You'll have to recompile the bundle, the only time the environment affects the React application is during compile time (or with webpack-dev-server). So it would be NODE_ENV=production npm run compile && npm run server:start. See if that works.

from react-redux-starter-kit.

jmarlow4 avatar jmarlow4 commented on April 19, 2024

That also worked. I didn't need to override it with --no_debug. I did have to separate the commands set NODE_ENV=production and npm run server:start in order to get that to work as well. They're a little different so it would work with the way windows does environment variables and NPM scripts.

Seriously, excellent work with this. I'm really impressed by everything. I appreciate that the starting app is lean yet all the utilities and packages included are the best right now. I love your choice of Koa over Express, even though I'm more comfortable and familiar with Express, I love how React-Router is built in. Dude, this rocks so hard! This is exactly what I've been looking for. And now that I have it purring along I can finally conquer the world! HAR HAR HAR!

But seriously, thanks :)

from react-redux-starter-kit.

jmarlow4 avatar jmarlow4 commented on April 19, 2024

The reason it wasn't working before is because I was messing with the .babelrc file when I could have just set env variables with the console. To make it work I rimraffed the entire folder, recloned the repo, freshly installed all the packages, set the correct environment variables, and then ran the scripts in their logical order (as specified on your readme). THEN it worked.

from react-redux-starter-kit.

dvdzkwsk avatar dvdzkwsk commented on April 19, 2024

Hooray for stuff working! Haha. Thanks so much, it means a lot :). It's really hard to get something that does what most people want without being too opinionated, so hopefully you're able to make good use of this.

Anyways, glad you figured it out. I'll close this for now, but let me know if you run into anything else!

P.S. I had to laugh at the Express comment. I'm horribly inexperienced with Koa but love a lot of its design decisions, so wanting to get more proficient with it was a big part of why I chose it over Express :P.

from react-redux-starter-kit.

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.