This is the backend code repository for nextjs-chat project.
index.jscontains code for basic intro and home page of backend.users.jscontains code to look for any data related to users or perform several operations on the users details and database.data.jscontains code to look for any data except users.socketApi.jscontains code for socket logic(chat).
-
Clone this repository and
cdin it. -
npm installwould install all the dependencies. -
create a
.envfile with the following line in it.CLIENT_URL=http://localhost:3000Herehttp://localhost:3000is the client server address. Check that project out here. -
npm startornodemon start(if you have nodemon installed) would start the server.