Skip to content

This repo is a starter kit that sets up front-end and back-end of a simple react , node with surreal db

Notifications You must be signed in to change notification settings

MSaiKiran9/react.nodejs_starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

react.nodejs_starter

This repo is a starter kit that sets up front-end and back-end of a simple react and node app. This app's backend after auth connects with surrealdb and adds random users data to surrealdb as many times as we start the server . Front-end after successful auth connects with surrealdb fetches the data from the surrealdb and displays in the UI. Just like a simple publish-subscribe model. It uses database auth mode in surrealist app.

steps to initialize the starter kit :

  1. install surreal from the official page's documentation

  2. start the surreal server using command : surreal.exe start memory -A --auth --user root --pass root

  3. clone the repository and setup back-end and front-end seperately .

  4. get into the front-end folder and type npm install & same for backend this will install all the dependencies .

  5. now type npm run dev in the front-end and node app.js in the backend and the terminals will look something like this :

    front-end terminal:

    front-end terminal

    back-end terminal:

    image
  6. In the browser now go to http://localhost:5173/ where the vite is serving the front-end's webpage the ui will look something like this :

    image

From Here:

  1. This as a base point we can implement client - server model & so on with surreal db as database .
  2. With this base we can also change auth modes or tweak auth modes as per the need .

Debugging:

  • Some console logs & methods are commented to ensure one can quickly comment out and check some other surrealdb methods and better debug the issues while connecting to surrealdb .

Any issues ?

  • Feel free to raise the issue and contribute :)

About

This repo is a starter kit that sets up front-end and back-end of a simple react , node with surreal db

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published