<aside> 💡 After finishing this series of steps, you will have the project fully functional and integrated.
</aside>
Edit the file /src/utils/serverUrl.ts and modify the URL where the backend will be served
const serverURL = process.env.NODE_ENV === 'development' ? '<http://localhost:8080>' : '<https://yoourApiUrl>';
const serverURLWS = process.env.NODE_ENV === 'development' ? 'ws://localhost:8080' : 'wss://yoourApiUrl';
Add the following environment variables to your backend
JWT_SECRET="YourStringUniqueAsSectretForAuthPackage"
DATABASE_URL="String"
<aside> 💡 To transform credentials from a local database into a string, you must ensure that you have the necessary information, such as the database name and server address. Then, you can create a connection string using the following syntax:
mysql://<user>:<password>@<server>/<BDName>
Replace <username>
and <password>
with your database credentials and <server address>
and <database name>
with the address and name of your database respectively. Once you have created the connection string, you can use it to connect to the database from your application.
</aside>
<aside> 💡 You can directly obtain a connection string on a cloud platform such as DigitalOcean or PlanetScale.
</aside>
<aside> 💡 For more info https://www.prisma.io/docs/reference/database-reference/connection-urls
</aside>
<aside> 💡 An easy way to get a database and connect it easily is by using any cpanel provider. You can see how to create and access the database in cpanel here: https://www.knownhost.com/kb/how-to-connect-to-mysql-remotely-in-cpanel/
</aside>
Access the console of your backend, at the root of the project, and run:
npx prisma db push && npx prisma db seed
<aside> 💡 The administrative credentials are: Email: [email protected] Password: 123456789
</aside>
In the /admin/settings section, you will find all the necessary fields to set up the integration with Stripe (Payments), ImageKit (Images), and SMTP (Email).
<aside> 💡 Remember to add the stripe webhook address in your configuration panel on stripe.com
</aside>
Webhook Url: https://yourbackendurl/**v1/stripe/webhook**