... | @@ -121,6 +121,30 @@ To deploy our web application, we opted to store our data in the [MongoDB Atlas |
... | @@ -121,6 +121,30 @@ To deploy our web application, we opted to store our data in the [MongoDB Atlas |
|
|
|
|
|
Upon creating a new project on MongoDB Atlas, you receive a connection string. We replaced the previous local connection string with this one and started the application. The connection was established successfully.
|
|
Upon creating a new project on MongoDB Atlas, you receive a connection string. We replaced the previous local connection string with this one and started the application. The connection was established successfully.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
mongodb+srv://<username>:<password>@blockevent.swcprgq.mongodb.net/?retryWrites=true&w=majority
|
|
|
|
```
|
|
|
|
|
|
|
|
The <username> and <password> have to be then replaced with the right information to access the database.
|
|
|
|
|
|
### Backend & Frontend
|
|
### Backend & Frontend
|
|
|
|
|
|
For our full-stack deployment, we chose [Vercel](https://vercel.com). This deployment service offers free trial options and is fully compatible with Next.js, which is the framework we are using for our frontend and backend development.
|
|
For our full-stack deployment, we chose [Vercel](https://vercel.com). This deployment service offers free trial options and is fully compatible with Next.js, which is the framework we are using for our frontend and backend development.
|
|
|
|
|
|
|
|
The website can be found under:
|
|
|
|
https://blockevent.vercel.app
|
|
|
|
|
|
|
|
We do not have an own domain, as using your own domain is a paid feature in Vercel.
|
|
|
|
|
|
|
|
Another important point to note is the need to create a .env file in your project, which contains the necessary environment variables for the localhost setup. The following variables should be included:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
NEXT_PUBLIC_API_URL=http://localhost:3000/
|
|
|
|
```
|
|
|
|
```sh
|
|
|
|
NEXTAUTH_URL=http://localhost:3000/
|
|
|
|
```
|
|
|
|
|
|
|
|
By including these variables in the .env file, you ensure that Vercel can access and update them according to the required website address. Since we are using NextAuth.js for session management, which also relies on localhost, it is crucial to include these variables in the Vercel environment as well. You can accomplish this by navigating to the project's settings and adding them under the "environment variables" section.
|
|
|
|
|
|
|
|
 |
|
|
|
\ No newline at end of file |