GithubHelp home page GithubHelp logo

funnelbit / go-intern-diary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hatena/go-intern-diary

0.0 0.0 0.0 183 KB

はてなインターン2018 課題アプリケーションひな形

Dockerfile 1.04% Makefile 1.60% Go 89.05% Shell 0.99% TypeScript 4.46% CSS 0.07% JavaScript 2.79%

go-intern-diary's Introduction

go-Intern-Diary

ディレクトリー構成

  • db: データベースのテーブルスキーマ
  • config: 環境変数から読み込む設定
  • model: モデル層: 型定義を書きます
  • repository: データベースにアクセスするリポジトリ層
  • service: Diaryアプリケーションを定義するサービス層
  • web: webサーバーのルーティングやリクエストの解釈、レスポンスを実装するweb層
  • ui: フロントエンド
  • templates: HTMLテンプレート
  • resolver: GraphQLスキーマとクエリの実行
  • loader: GraphQL用のデータローダー

実行

サーバー起動

docker-compose up --build
open http://localhost:8000

GraphiQL

open http://localhost:8000/graphiql

テスト実行

docker-compose build && docker-compose run --rm app make test

MySQL

docker-compose exec db mysql
mysql> use intern_diary;
mysql> select * from user;

Dockerコンテナを作り直すために一旦削除

docker ps -a
docker stop <container id>
docker rm <container id>
# または
docker rm -f <container id>

例: データベーススキーマを変更する時はmysqlコンテナを作り直す

docker ps -a | grep mysql
docker rm -f 83ece5d09062

フロントエンド

サーバーを起動すると自動的にwatchされる

docker-compose up

テスト実行

docker-compose run --rm node yarn test

go-intern-diary's People

Contributors

funnalbit avatar tanishiking avatar

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.