Code Monkey home page Code Monkey logo

poster's Introduction

Posterの使用方法

オンラインで使用する場合

下記リンクからアクセスすることができます。

http://35.74.93.123/

ローカルで使用する場合

docker、docker-composeをインストールしたのちに、

ターミナルで任意のディレクトリに移動

次に、

$git clone https://github.com/kzmeorna/poster.git

を実行

次に、

$ docker-compose up -d

の実行

次に、データベーステーブルの作成を行います。

$ docker exec -it poster_db_1 bash

を実行します。

そしたら、MySQLコンテナ内に入れます。

次に、

$ mysql -u root -p

を実行します。

実行後、パスワードを求められるので、

rootpass

と入力します。

その次に、

./work/app/init.sqlのコードを以下順に実行します。

$ create database poster;
create user 'dbuser'@'%' identified by 'aaa';
grant all on *.* to 'dbuser'@'%' with grant option;
use poster;

ユーザーテーブル

create table users(
userNumber int not null auto_increment primary key,
name varchar(20),
userId varchar(255) unique,
email varchar(255) unique,
password varchar(255),
selfIntroduction text
);

記事テーブル

create table posts(
postNumber int not null auto_increment primary key,
userNumber int not null,
post text,
favorites int default 0
);

いいねテーブル

create table favorites(
favoriteNumber int not null auto_increment primary key,
userNumber int not null,
postNumber int not null
);

画像ファイルパステーブル

create table images(
imageNumber int primary key not null auto_increment,
userNumber int not null,
filePath varchar(255),
imgType int
);

そしたらlocalhost:80にアクセスすることができます。

サーバーを止めたいときは

$ docker-compose down

と実行すればOKです。

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.