I noticed that you're handling production in a pretty complicated way. You're basically telling people to either use Python on the prod platform or set up a programmatic server using express (here).
Why? All of this could be solved easier:
And then this command would sit in a script property of your choice inside package.json:
By default, serve is just a beautiful, tiny (and fast as hell) webserver for static files and sites. But in combination with the -s or --single flag, it will handle all of the logic required for making single page applications work (in terms of routing).
I would even suggest shipping serve by default as a dependency (like you're doing it with react-scripts and react).
Let me know what you think! 😊
I noticed that you're handling production in a pretty complicated way. You're basically telling people to either use Python on the prod platform or set up a programmatic server using express (here).
Why? All of this could be solved easier:
And then this command would sit in a
scriptproperty of your choice insidepackage.json:By default, serve is just a beautiful, tiny (and fast as hell) webserver for static files and sites. But in combination with the
-sor--singleflag, it will handle all of the logic required for making single page applications work (in terms of routing).I would even suggest shipping serve by default as a dependency (like you're doing it with
react-scriptsandreact).Let me know what you think! 😊