This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
go: | |
build: | |
context: ./go/ | |
target: dev | |
volumes: | |
- ./go/src:/go/src:cached | |
working_dir: /go/src/app | |
ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:latest as dev | |
RUN apt-get update \ | |
&& apt-get install -y vim \ | |
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table IF not exists `users` | |
( | |
`id` INT(20) AUTO_INCREMENT, | |
`first_name` VARCHAR(20) NOT NULL, | |
`last_name` VARCHAR(20) NOT NULL, | |
PRIMARY KEY (`id`) | |
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<input v-model="lastName" placeholder="姓"> | |
<input v-model="firstName" placeholder="名"> | |
<button @click="addUserFromForm" class="button">登録</button> | |
<div class="table"> | |
<div class="table-row"> | |
<div class="table-column table-column-1">ID</div><div class="table-column table-column-2">名前</div> | |
</div> | |
<template v-for="user in users"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
export const state = () => ({ | |
users: [] | |
}) | |
export const mutations = { | |
setUsers(state, users) { | |
state.users = users; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "project", | |
"version": "1.0.0", | |
"description": "My kickass Nuxt.js project", | |
"author": "", | |
"private": true, | |
"scripts": { | |
"dev": "HOST=0.0.0.0 PORT=3000 nuxt", | |
"build": "nuxt build", | |
"start": "nuxt start", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package infrastructure | |
import ( | |
"app/interfaces/controllers" | |
"github.com/gin-gonic/gin" | |
) | |
var Router *gin.Engine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
go: | |
build: | |
context: ./go/ | |
target: dev | |
volumes: | |
- ./go/src:/go/src:cached | |
working_dir: /go/src/app | |
tty: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 開発 | |
FROM golang:latest as dev | |
RUN apt-get update \ | |
&& apt-get install -y vim \ | |
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | |
# 本番ビルド用 | |
FROM golang:latest as builder | |
WORKDIR /go/src/app/ | |
COPY ./src/app . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB_USER=user | |
DB_PASSWORD=password | |
DB_HOST=mysql:3306 | |
DB_DATABASE=database | |
DB_SOCKET=tcp |
OlderNewer