GithubHelp home page GithubHelp logo

messenger-chat-app's Introduction

Messenger App

Setup client via vite (react + js) Install tailwind, axios

Create Register component Add a form with inputs to username and password and use tailwind. Create onSubmit function to deal with submission of form via axios that sends a post response to the '/register' handler which contains uname and pword. Create onChange attribute of the inputs to set the values to the entered values via useState hook

In app.jsx, setup axios connection that deals with the base url to which the requests will be sent to.

Setup api folder to create backend. install express, mongoose, dotenv, cors, jwt, nodemon Import userSchema [Initiates a connection via mongoose to handle uname, pword entries along with timestamp of creation] Create MongoDB connection, initialize jwt access. app.get for test path

post for /register handler to access the uname and pword sent from frontend, create user from the userSchema imported. Generate a jwt token for the said user by accesing mongodb entry id, send the token back to the client as a cookie and store the said user's data.

messenger-chat-app's People

Contributors

guptasukant1 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.