README.md 2.78 KiB

Evensio Scanner

Event Online / Offline Platform

Quotes

"Simplicity is the ultimate sophistication"

Prequisites

  1. Caddy
  2. NATS
  3. Node.js
  4. Yarn

Development Guides

Before you start

Please do these steps before continuing

Basic configuration

  • If you have no config file yet, create these config from examples
    • copy config/app.example.yaml as config/app.yaml then configure
    • copy config/Caddyfile.example as config/Caddyfile then configure
  • Map or route 127.0.0.1 to local.dev.kano.app on your OS hosts file

Install depedencies

  • Open your terminal, at evensio workspace root directory do these tasks

    • Install frontend depdencies using

      yarn install
    • Install backend depedencies using

      go mod download

      ⚠ If you get problem fetching git.kanosolution.net private repos please run

      git config --global url."git@git.kanosolution.net:".insteadOf "https://git.kanosolution.net/"

      ⚠ Since most of the depedencies inside git.kanosolution.net are private, please run

      go env -w GOPRIVATE=git.kanosolution.net/kano/*

      in order to exclude those repository source from checking into sum.golang.org

Run development

Manually

  • Run Caddy

    caddy run --config=config\Caddyfile
  • Run NATS server

    nats-streaming-server -V
  • Run each of backend services
    ⚠ Start config service first, then others

    go run services/{sericename}/main.go
  • Run webs

    yarn run dev:app
  • Access https://local.dev.kano.app:36080/

Using Visual Studio Code (Debug)

  • In order to run NATS and Caddy, you can open it via keyboard shortcut

    // Windows
    Ctrl + Shift ⇧ + P
    
    // Mac
    ⌘ + Shift ⇧ + P

    then search and choose Tasks: Run Task finally select # Run Microservices Depedencies

  • To run webs open Tasks: Run Task again, then select # Run Webs

  • To run microservices using F5 and choose Launch Microservices then it will run in debug mode. You can use VS Code breakpoint to ease your developing process.

Backend Development Notes

Documentating API

📝 Spare your 5 seconds to documentating your API. You can use swagapi snippet on your Visual Studio Code for guidelines. More about API documentation, you can read here

Frontend Development Notes

will be given later

FAQ

Q : I write javascript/typescript correctly, but it is shown as error, what should I do ?
A : Reload your Visual Studio Code, or restart your laptop. If it is still error then it is not an IDE issue, it is your code problem