Git Product home page Git Product logo

guestbook's Introduction

nil.camp

Build Status

접속주소

http://52.68.124.223

개발 시작하기

1. 프로젝트 받기

$ git clone https://github.com/clojure-study/guestbook.git
$ cd guestbook

2. PostgreSQL 설치 및 실행

http://www.postgresql.org/download/ 에서 OS에 따라 설치하고 실행한다.

맥 사용자의 경우

맥의 경우 가장 쉬운 방법은 다음과 같다: http://postgresapp.com/ 에서 다운로드하고, /Applications로 옮기고, 더블클릭하여 실행한다.

우분투 사용자의 경우 쉬운 설정방법

설치 이후 간편 사용 설정법은 링크의 내용을 참조한다.

3. psql 접속 및 User, Database 생성

psql 에 접속하여 user 와 Database 를 생성한다.

Database 생성

project.clj 의 :profiles :dev :db-spec 참고하여 database 를 생성한다.

psql# CREATE DATABASE {database name};

User 생성

psql# CREATE USER {user name} WITH PASSWORD {password name};

4. DB 초기 셋업

$ lein run migrate

5. 프로젝트 실행

$ lein run

6. 확인

웹 브라우저로 http://localhost:3000 에 접속하여 확인

배포하기

빌드

$ cd guestbook
$ lein uberjar

파일 업로드

$ scp -i "clojurestudy-aws.pem" .lein-env [email protected]:~
$ scp -i "clojurestudy-aws.pem" target/guestbook.jar [email protected]:~/target

pem 파일의 path는 배포자에 따라 다를 수 있음. 또한, .lein-env에서 :production이 true임을 주의하자.

서버 재시작

ssh로 접속하여 screen 세션에 들어감

$ ssh -i "clojurestudy-aws.pem" [email protected]
$ screen -r

서버 정지하고 80포트로 다시 시작

Ctrl + c
$ sudo java -jar target/guestbook.jar 80

세션에서 나옴

Ctrl + a + d

guestbook's People

Contributors

manmyung avatar djey9538 avatar yangwansu avatar dreamofsnail avatar soulawaker avatar ksseono avatar duddns avatar expert0226 avatar

Watchers

James Cloos avatar  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.