Code Monkey home page Code Monkey logo

twir's Introduction

Development

Requirements

Cli

Note

For MOST of project management tasks we use own written cli. You can use pnpm cli help for print cli usage

  • Run needed services (Postgres, Adminer, Redis, Minio)
docker compose -f docker-compose.dev.yml up -d
  • Install dependencies
pnpm cli deps
  • Build libs
pnpm cli build libs

Configure project for development

Well, now we are almost ready for developing project, just few steps.

  • Create twitch application https://dev.twitch.tv/console/apps
  • Set http://localhost:3005/login and https://tokens-generator.twir.app as your redirect url's for twitch application
  • Go to https://tokens-generator.twir.app, set clientID and clientSecret from your app and generate initial token WITH ALL SCOPES
  • cp .env.example .env and fill required envs

Run project

  • Start dev mode
pnpm cli dev

Writing migrations

  • Use command for create new migration
pnpm cli migrations create
  • Navigate to folder and edit new migration file
cd libs/migrations/migrations
  • Run new created migrations (optional, because it's running when you execute pnpm dev)
pnpm cli migrations run
Write go models
  • Go to libs/gomodels
  • Create new file and describe the go schema
  • Do not forget about TableName() for struct

Https on localhost (optional)

We'll use dev.twir.app domain, but you can use any other domain.

  • Add https://dev.twir.app/login to your twitch application redirect url's

  • Edit .env entries:

TWITCH_CALLBACKURL=https://dev.twir.app/login
SITE_BASE_URL=dev.twir.app
USE_WSS=true
  • Add to your /etc/hosts or C:/Windows/System32/drivers/etc/hosts file new entry:
127.0.0.1 dev.twir.app
  • Start caddy:
pnpm cli proxy

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.