Start React App with Command Line Arguments

Viewed 1892

I'd like to be able to launch my client-side React app from another programming language and pass it some command line arguments which would be passed to top level props or a context (or whatever).

I basically want to be able to launch a command like:

npm start inputFile="/path/to/input/file.ext"

And have the inputFile path be passed to my React app. Is this possible? I'm using create-react-app to bootstrap my app.

1 Answers
Related