Showing posts with label Lucee. Show all posts
Showing posts with label Lucee. Show all posts

Wednesday, February 18, 2026

.::: Sample Access Database MariaDB via Backend Golang & Frontend using Lucee & PHP :::.

 


1. Sample for table pembelian

mkdir -p /opt/go-pembelian
cd /opt/go-pembelian

mkdir backend
cd backend

2. run mod & driver 

cd backend
go mod init pembelian-api
go get github.com/go-sql-driver/mysql

[root@teguhth-all go-pembelian]# cd backend
[root@teguhth-all backend]# go mod init pembelian-api
go: creating new go.mod: module pembelian-api
[root@teguhth-all backend]# ls
go.mod
[root@teguhth-all backend]# go get github.com/go-sql-driver/mysql
go: downloading github.com/go-sql-driver/mysql v1.9.3
go: downloading filippo.io/edwards25519 v1.1.0
go: added filippo.io/edwards25519 v1.1.0
go: added github.com/go-sql-driver/mysql v1.9.3

[root@teguhth-all backend]# pwd
/opt/go-pembelian/backend
[root@teguhth-all backend]# ls
go.mod  go.sum
[root@teguhth-all backend]#
 

Monday, February 9, 2026

.::: Sample Access Database MariaDB via Frontend & Backend using Lucee :::.

 


1. enable datasource 
 


2. backend 


http://10.10.10.90:8888/pembelian_api.cfm

[root@teguhth-all ROOT]# pwd
/opt/lucee/tomcat/webapps/ROOT
[root@teguhth-all ROOT]#
[root@teguhth-all ROOT]# cat pembelian_api.cfm
<cfquery name="
qPembelian" datasource="dbteguhth">
 SELECT
        KODE_PEMBELIAN,
        KODE_BARANG,
        KODE_CUSTOMER,
        TANGGAL_PEMBELIAN,
        JUMLAH_PEMBELIAN
    FROM pembelian
</cfquery>

<cfcontent type="application/json">
<cfoutput>#serializeJSON(qPembelian)#</cfoutput>

[root@teguhth-all ROOT]#

Tuesday, November 25, 2025

.::: Install Lucee 6 In Almalinux 9 Centos 9 :::.

 



1. Install httpd & enable 

dnf install httpd -y

systemctl enable httpd
systemctl start httpd


2. download lucee wget https://cdn.lucee.org/lucee-6.2.3.35-linux-x64-installer.run

3. install lucee 


/opt/lucee-6.2.3.35-linux-x64-installer.run

[root@teguhth nitip2]# /opt/lucee-6.2.3.35-linux-x64-installer.run
----------------------------------------------------------------------------
Welcome to the Lucee Installer.

Tomcat Version: 11.0.13
Bundled Java: 21.0.9+10-LTS

----------------------------------------------------------------------------
Please read the following License Agreement. You must accept the terms of this
agreement before continuing with the installation.
 

Monday, November 24, 2025

.::: Testing Script Lucee using Driver MariaDB & MySQL to access MariaDB Database :::.

 

1. create database & access

CREATE DATABASE testdb;
CREATE USER 'luceeuser'@'%' IDENTIFIED BY 'Password123!';
GRANT ALL PRIVILEGES ON testdb.* TO 'luceeuser'@'%';
FLUSH PRIVILEGES;

CREATE TABLE IF NOT EXISTS test_table (
            id INT AUTO_INCREMENT PRIMARY KEY,
            pesan VARCHAR(255)
        );

INSERT INTO test_table (pesan) VALUES ('Halo dari Lucee di CentOS 9!');

SELECT * FROM test_table ORDER BY id DESC LIMIT 5;

 

Popular Posts