Testing some next-js + react with typescript?
npm run dev
- Create new prject
- Create fist static site with content from Starwars API (https://swapi.dev/api/people/1/)
- Create postgres database with prisma and tablename=starwars (Small guide - https://vercel.com/guides/nextjs-prisma-postgres)
- Create static content in mysql database (to show on a page when we connect to database
npx prisma studio
- Connect to mysql/postgres database and show content on page (Connect to existing mysql database: https://www.prisma.io/docs/concepts/database-connectors/mysql, https://www.youtube.com/watch?v=CQcaeIhVB8c)
- Create route to add to mysql (dota) (https://www.youtube.com/watch?v=cQ6V7ZHzg8c&t=2164s This could be to help)
- Create route to PUT/change mysql (dota)
- Create route to delete (name)
- Remove after post values on the form ()
Done
- Backend with FastAPI
- Google maps iframe
.env file
DATABASE_URL = "mysql://your_username:your_password@localhost:3306/your_db_name"
or sqllite
DATABASE_URL="file:./dev.db"
Here are the prisma commands
npx prisma init
npx prisma generate
npx prisma migrate dev