Code Monkey home page Code Monkey logo

next-chat-server-side's Introduction

Build a chat application in Next.js with socket.io

Client side (Frontend)

In client folder, follow next.js command to run yarn dev Then you can see the client side will be running at port 3000 as next.js default port.

Server side (Backend)

In server folder, follow node.js command to run node index.js

or follow nodemon command to run nodemon index.js

Make sure installed nodemon in global of your computer.

Then you can see the server will be started at port 3001. Server is running on port 3001

Set project on AWS EC2

The big challenge for me is deployed frontned and backend on AWS EC2 server to build a web. I set up nginx for running a web server, and use SSL as secruity url to visit the website. I use socke.io-client for client side and socket.io for server side to handshake. It was the first time I make a project for both side to run a web server.

For this project, I haven't made a pretty layout with it, just foucs on functional for the actions about join/leave room, send/recevie message, system send message when the user join/leave.

use pm2 handle frontend and backend

This project is using pm2 to handle next.js(frontend) and node.js(backend) on web service.

next-chat-server-side's People

Contributors

bxbdev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.