Problems with deploy
Hello guys! i'm trying to deploy a SPA. and when I tried to deploy the back, the console send me this ==> Failed to load resource: the server responded with a status of 503 () ,
but on my deploy log in the app, I only see this ==>
[email protected] start
node ./index.js
%s listening at 3001
31 Replies
Project ID:
N/A
what kind of spa?
is an app withe the API, pokeapi
PokéAPI
An open RESTful API for Pokémon data
you said single page app though?
yes
this is the service id 914cc79d-9191-4077-b4fc-dc13ddfa8619
spa != api
i mean, my spa, make req on this api, for get the pokemons
okay so again, what kind of spa
sorry, im pretty new, so my spa, make a get req for get the information of the pokemon, and then my front take this for present on react the diferents pokemons for explame on my home view I show the first 50 pokemons
show me the start script located in your react app's package.json please
sure! thanks! "scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
follow this guide to get your react app running properly on railway
https://help.railway.app/project-help/f9v3gkPQRy4UShk5SnoPDH/getting-your-create-react-app-running-on-railway/qHRsgxa5n57xLp1yVgk9fP
okay! i gonna do it! thanks! but just in case, I can see the diferents views of my react app, like the landing , home etc, but I can not use the back like on insomia for expample
one thing at a time, please complete that guide first
okay! thank so much
when you have finshed, send your entire package.json for your react app
okay, so now looks like this ==> "scripts": {
"dev": "react-scripts start",
"start": "serve build -s -n -L -p $PORT",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
send your entire package.json for your react app
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@reduxjs/toolkit": "^1.9.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.5",
"react-router-dom": "^6.11.1",
"react-scripts": "^5.0.1",
"redux": "^4.2.1",
"serve": "^14.2.0",
"web-vitals": "^2.1.4"
},
"scripts": {
"dev": "react-scripts start",
"start": "serve build -s -n -L -p $PORT",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
have you commited this to github yet?
ready!
successful deployment?
yes!
but i can not see the information from my back yet, should i send you the console?
okay on to the pokemon api
send me the railway domain for the pokemon thingy
please read this docs page now
https://docs.railway.app/troubleshoot/fixing-common-errors
okay let me check
is workiinggggg!!!
thank you so much!!
no problem 🙂
i really apreciate! have a good day!!
you too!