GithubHelp home page GithubHelp logo

helloint's Introduction

HelloINT

https://www.youtube.com/watch?v=NT8r1Z_6IcA&feature=youtu.be

สิ่งที่จำเป็นต้องมี

  • Tomcat
  • Maven

โครงสร้างฐานข้อมูลของโปรเจค

  • Database Name : HelloWorld
  • Table Name : hello
  • สามารถดู sql command ที่ใช้ได้ในไฟล์ hello.sql

สิ่งที่ต้องทำก่อนการ deploy

หลังจากที่ clone ตัวโปรเจคลงมาแล้ว ให้เปิด bash และเข้าไปที่ directory ของโปรเจค โดยใช้คำสั่ง

cd ./src/main/resources

และใช้คำสั่ง

cp env.example.properties env.properties

จากนั้นใช้ text editor เข้าไปแก้ไขไฟล์ env.properties ที่สร้างมาเมื่อขึ้นตอนก่อนหน้า

CAREERITY_DB_IP=        \\ip address ของ database ที่จะเข้าไปเชื่อมต่อ
CAREERITY_DB_NAME=      \\ชื่อของ database
CAREERITY_DB_USER=      \\username ที่ใช้เข้าถึง database
CAREERITY_DB_PASS=      \\password ที่ใช้เข้าถึง database
CAREERITY_DB_PORT=      \\port ของ database

กลับมาที่ directory ของโปรเจคโดยใช้คำสั่ง

cd ../../..

Deploy ลง tomcat

ทำการ download dependency ของตัวโปรเจคโดยใช้คำสั่ง

mvn install

ในการ depoly นั้นสามารถแก้ context path จะไป depoly ได้โดยเข้าไปแก้ที่ไฟล์ pom.xml ที่ tag path

.
.
<configuration>
  <url>http://127.0.0.1:8080/manager/text</url>
  <server>TomcatServer</server>
  <path>/${project.artifactId}</path>
</configuration>
.
.

เข้าไปที่ ${MAVEN_HOME}/conf และเปิดไฟล์ settings.xml ด้วย text editor และเพิ่ม field ที่ tag server ดังนี้

 <server>
 .
 .
   <server>
      <id>TomcatServer</id>
      <username>admin</username>      \\username ที่ใช้ login tomcat
      <password>password</password>   \\password ที่ใช้ login tomcat
   </server>
</server>

สามารถ deploy ลง tomcat ได้โดยใช้คำสั่ง

mvn tomcat7:deploy

เมื่อต้องการอัพเดตโปรเจคให้ใช้คำสั่ง

mvn tomcat7:redeploy

เมื่อต้องการยกเลิกการ deploy ให้ใช้คำสั่ง

mvn tomcat7:undeploy

helloint's People

Contributors

watzeedzad avatar ekawat40 avatar kardash 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.