All Projects → delta → dalal-street-server

delta / dalal-street-server

Licence: other
Server for Pragyan's Dalal Street

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to dalal-street-server

dalal-street-client
Frontend client for Dalal Street
Stars: ✭ 13 (-80%)
Mutual labels:  grpc, stock-market, dalal-street
grpc-chat
Simple Chat Server/Client implemented with gRPC
Stars: ✭ 107 (+64.62%)
Mutual labels:  protocol-buffers, grpc, grpc-go
Prototool
Your Swiss Army Knife for Protocol Buffers
Stars: ✭ 4,932 (+7487.69%)
Mutual labels:  protocol-buffers, grpc, grpc-go
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (+126.15%)
Mutual labels:  protocol-buffers, grpc
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (+64.62%)
Mutual labels:  protocol-buffers, grpc
Go Proto Gql
Protobuff plugins for generating graphql schema and golang to graphql bindings. Also supports a graphql gateway (Alpha)
Stars: ✭ 127 (+95.38%)
Mutual labels:  protocol-buffers, grpc
Ts Protoc Gen
Protocol Buffers Compiler (protoc) plugin for TypeScript and gRPC-Web.
Stars: ✭ 913 (+1304.62%)
Mutual labels:  protocol-buffers, grpc
Evans
Evans: more expressive universal gRPC client
Stars: ✭ 2,710 (+4069.23%)
Mutual labels:  protocol-buffers, grpc
Protodep
Collect necessary .proto files (Protocol Buffers IDL) and manage dependencies
Stars: ✭ 167 (+156.92%)
Mutual labels:  protocol-buffers, grpc
Go Grpc Examples
This repo contains examples and implementations of different types of GRPC services and APIs using Golang.
Stars: ✭ 180 (+176.92%)
Mutual labels:  protocol-buffers, grpc
protoc-plugin
A protoc compiler plugin for Clojure applications
Stars: ✭ 28 (-56.92%)
Mutual labels:  protocol-buffers, grpc
Protoc Gen Struct Transformer
Transformation functions generator for Protocol Buffers.
Stars: ✭ 105 (+61.54%)
Mutual labels:  protocol-buffers, grpc
Grpc Swift
The Swift language implementation of gRPC.
Stars: ✭ 1,270 (+1853.85%)
Mutual labels:  protocol-buffers, grpc
Protoeasy Go
Simpler usage of protoc. Deprecated.
Stars: ✭ 129 (+98.46%)
Mutual labels:  protocol-buffers, grpc
Google Assistant Java Demo
A simple Google Assistant Client in Java
Stars: ✭ 53 (-18.46%)
Mutual labels:  protocol-buffers, grpc
Buf
A new way of working with Protocol Buffers.
Stars: ✭ 3,328 (+5020%)
Mutual labels:  protocol-buffers, grpc
Mu Haskell
Mu (μ) is a purely functional framework for building micro services.
Stars: ✭ 215 (+230.77%)
Mutual labels:  protocol-buffers, grpc
grpc-graphql-gateway
A protoc plugin that generates graphql execution code from Protocol Buffers.
Stars: ✭ 239 (+267.69%)
Mutual labels:  protocol-buffers, grpc
Startup Os
Working examples of Google's Open Source stack and deployment to the cloud.
Stars: ✭ 564 (+767.69%)
Mutual labels:  protocol-buffers, grpc
Protoreflect
Reflection (Rich Descriptors) for Go Protocol Buffers
Stars: ✭ 651 (+901.54%)
Mutual labels:  protocol-buffers, grpc

CircleCI build status Go Report Card

Server for Dalal Street

Prerequisites

  • Go 1.16
  • Protocol buffers
  • MySQL

Build instructions

  • Setting up server

Refer Setup Wiki for setting up Dalal-Street-Server

  • Setup submodules
git submodule init
git submodule update --recursive
  • Create databases and run migrations
mysql -u root -p -e "CREATE DATABASE dalalstreet_dev; CREATE DATABASE dalalstreet_test;"
migrate -path "./migrations" -database "mysql://root:YOUR_MYSQL_PASSWORD@/dalalstreet_dev" up
  • Generate proto files
./scripts/build_proto.sh
  • Run cp config.json.example config.json
  • Fill in the database credentials in the Dev section of config.json.
  • Run the server
    • development - Install air for live reload
      air
    • production
      go run main.go

Create Migrations

migrate create -ext sql -dir ./migrations MIGRATION_NAME

Tests

  • Run the test script locally before pushing commits.
./scripts/test.sh

Docker usage instructions

  • Install docker and docker-compose.

  • Run cp .env.example .env and cp config.json.example config.json.

  • Fill in the DB_PASS in .env and make any additional changes if necessary.

  • Use the same credentials in Docker section config.json (DbPassword)

  • Running server

docker-compose up
  • Once the containers are up, you can get shell access by using
docker exec -it <CONTAINER_NAME> bash
docker-compose build
docker-compose up

(might require sudo, depending on permissions of volume mount './docker/' )

  • To view all running docker containers:
docker ps
  • Server logs are present in ./docker/logs/

GoMock usage instructions

  • To generate mock for a file using mockgen, place this comment after import statement
 //go:generate mockgen -source {YOUR_FILE_NAME}.go -destination ../mocks/{YOUR_FILE_NAME}.go -package mocks
  • To generate mocks for all packages that has above comment
go generate ./...

  • To manually generate a mock package
mockgen -destination=mocks/{YOUR_FILE_NAME}.go -package=mocks {PATH_TO_YOUR_FILE}

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].