GithubHelp home page GithubHelp logo

wikid-api's Introduction

Setup MySQL

Firstly install your MySQL server locally (default port 3306) and configure it with a root user with a password (I have used root:Password123).

Create a database chat_users_db in your MySQL server.

Run your migrations

Install the go migrate CLI tool:

https://github.com/golang-migrate/migrate/tree/master/cmd/migrate

Verify you have a migrate tool available in your $PATH

Create a database called chat_users_db, then run the migration:

migrate -database "mysql://root:password@tcp(127.0.0.1:3306)/chat_users_db" -path ./db/migrations/ up

This should create all the tables in the migrations folder.

If the migrations were successful, the file (e.g 000026_create_messages.up.sql) in the migrations folder with the largest number should appear in the schema_migrations table.

Setup .env file

AES_IV="my16digitIvKey12"
AES_KEY="umzwBkl86iYOmoIIuWs5frDe8MyCyh6O"
JWT_SECRET="kaospdkapsodkapdkapsd"
SALT="asdioasjdojasiodjasoidaijosdaoisaj"
DATABASE_URL="root:password@tcp(127.0.0.1:3306)/chat_users_db?parseTime=true"
READ_REDIS_URL="redis://localhost:6379/0"
WRITE_REDIS_URL="redis://localhost:6379/0"
EXOTIC_FQN="wikid.app"
PORT=3003
WEB_ENV="http://localhost:3000"
PRIVATE_WS_INTERNAL_API="http://localhost:3006/v1/internal"

Run the api server

Navigate to api_hot folder and run

go run api_hot.go

Run the ws server

Navigate to api_ws folder and run

go run api_ws.go

Run the worker

Navigate to scheduler folder and run

go run scheduler.go

wikid-api's People

Contributors

mattsrobot avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

adrianlshaw

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.