Git Product home page Git Product logo

star's Introduction

STAR

Setup Instructions

1. Database

  • Login to your PostgreSQL Database:

    • psql -U postgres (or use your own postgres user)
  • Enter your password (if any)

  • Create a new Database:

    • CREATE DATABASE star_development;
  • Quit from the PostgreSQL client

    • \q

2. Express Server API

  • Make a copy of the /server/.env.example file, and rename it to .env

  • Add the Environment Variables and Secrets

# the ENVironment that Node is running in:
NODE_ENV=development # development | test | production

# the Port the Express Server runs on:
SERVER_PORT=4000

# the Database Connection details:
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=(your own postgres user)
DATABASE_PASSWORD=(your own postgres password)
DATABASE_NAME=star_development

# the Google Authentication details:
GOOGLE_CLIENT_ID=(your own google client id)
GOOGLE_CLIENT_SECRET=(your own google client secret)
GOOGLE_REDIRECT_URI=http://localhost:4000/api/auth/google/authorizationcode

# the customJWT Signing Secret:
JWT_SECRET=(some random long string)
  • Open a Terminal and change to the server directory

    • cd server
  • Install the Dependencies

    • npm install
  • Migrate the Database

    • npm run database:migration
  • Run the Express Server in Development Mode

    • npm run dev
  • Visit http://localhost:4000/api to check the Server

3. React Client

  • Make a copy of the /client/.env.example file, and rename it to .env

  • Add the Environment Variables

# the URL of the Express API Server:
VITE_SERVER_URL=http://localhost:4000

# the Google Client ID used for Authentication:
VITE_GOOGLE_CLIENT_ID=(your own google client id)
  • Open another Terminal and change to the client directory

    • cd client
  • Install the Dependencies

    • npm install
  • Run the React Client in Development Mode

    • npm run dev
  • Visit http://localhost:3000 to check the Client

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.