CommandBox를 먼저 인스톨 한다.
https://commandbox.ortusbooks.com/setup/installation
My first Coldbox Application with Template
coldbox create app skeleton=cbtemplate-{name}
quick-with-auth with cbguard, bCrypt quick, db.
Template.
Advanced
AdvancedScript
Elixir
ElixirVueJS
Rest
Rest-hmvc
Simple
SuperSimple
Quick-with-auth
Quick-tallwind-inertia
Qucik-with-auth Template이 좋은 이유
함께 딸려 오는 모줄들
cbauth, cbguard,bCrypt, cbValidation, Commandbox-dotenv + Commandbox-cfconfig, Commmandbox-mitrations, redirect-back, uniqueInDatabase
box를 실행한후 다음을 실행한다.
coldbox create app skeleton=cbtemplate-quick-with-auth
!code . // Box안에서 code를 실행할 수 있다.
server.json // cf버전 등등의 서버환경, 서버 이름, 포트 등등을 볼 수 있다.
server start 한 후
server list 로 서버 리스트 확인
list // 모든 모쥴을 트리구조로 열람 commandbox-cfconfig가 있는지 확인 있다고 하더라도 최신것으로 설치할 필요가 있다.
install commandbox-cfconfig // 이 모쥴을 설치한다.
cfconfig set adminPassword=cbox1 // lucee 서버 관리자로 password를 setting한다.
서버를 다시 시작하고 /lucee/admin/server.cfm으로 들어가 세팅한다.
서버에서 세팅해야 할 것
http://127.0.0.1/lucee/admin/server.cfm
Database를 연결한다.
왼쪽 Datasource를 클릭하여 데이타를 세팅한다. hostname, username, passwrod, datasource 이름 추가 하여 세팅한다.
외부에 노출시키는 방법
server start host=0.0.0.0 port=1234
포트를 열어놓는다
sudo ufw allow 1234/tcp
다른 컴퓨터에서 해당 서버의 ip주소에 포트번호를 붙여 브라우저에서 확인
http://192.168.1.110:1234
