Reputation: 33
Here is the scenario: I have NextJs app ready to go, I have ExpressJs Server ready to go, I have postgreSQL (pgAdmin) ready to go.
Can I or should I?
Deploy Next to Vercel, get a domain from GoDaddy (for example) and link it to project. Deploy both express and database to heroku.
I don’t know if I can do all of them on Vercel.
Upvotes: 1
Views: 1522
Reputation: 2056
Yes, you can do stuff you need with Vercel. Check this examples(express, mysql) of code, adapt it for your needs.
So, to deploy
git clone
repository of express example, modify it git push
to your github account..env
folder !very important!, and checking your .env
files are ignored by git (.gitignore
file). This check is very important because you never expose .env files and connection string at git)What I suggest to you:
useEffect
(react) you use useSWR
(react lib created by vercel and nextjs teams) hook for data fetching, so you will develop much more faster and "clean")I am sure you will enjoy!
P.S. for the pgsql and express you will need to construct your API routes,
Upvotes: 2