This is a series video and we are going to build a full-stack application from scratch using the MERN STACK (MongoDB, Express, React.js and Nodejs).
We will build a Sports Web App that allows you creating sports events and the app will include:
It is natural that after some time and a few updates, something breaks because many people forget to install the same dependencies versions that I have used when recorded the Bootcamp. So I have decided to update socket.io and socket.io-client to the latest version (3.1.1).
That will fix the cors issue that many of you face and prevent the Bootcamp from being outdated.
please check the code for the server and the client.
on the server-side please update the server.js to the following code.
const server = http.Server(app)
const io = require("socket.io")(server, {
cors: {
origin: "*",
methods: ["GET", "POST", "DELETE"]
}
});
on the client side please update the Dashboard page with the following code.
const socket = useMemo(
() =>
socketio.connect('http://localhost:8000/', { query: { user: user_id } }),
[user_id]
);
For deploying this project we will modificate our backend and start using the S3 data storage from AWS. Heroku does not keep your files into the server and because of that we are moving away from saving the images in disk to saving the images into the S3 that will host the images for us. You will need to create an AWS account and a new bucket that will be explained into the Episode 13-A. Following the next episode 13-B we are spliting the Backend and Frontend into two separeted projects to take the advantage of Heroku's CI/CD that basically deploys your code automatically when it detects a new code into your github repository.
The React Native Bootcamp is out we will build a client for the Web-App we built here, please find more about it here