I am new here and I have a question about React JS. I used the create-react-app tool to initialize my application. I wanted to ask how can I change the initial landing page when I start the application.
For example when i am executing 'npm start' it will go to open a new tab in the browser with url 'localhost:3000'. Now I want when I execute this command to open at localhost:3000/api.
Thank you for your time
Nick
You can edit the homepage in package.json
"homepage": "https://your website url/route of what you want start with",
for example:
"homepage": "https://icecreamzhao.github.io/api",
When you start the react application, you'll find that the app runs by opening the url http://localhost:3000/api as you expect.
Refer React docs for more info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With