Go to file
2025-06-07 14:20:45 +07:00
.beaker/data Implement session with beaker 2024-06-13 12:43:46 +07:00
config Perubahan handler di pertemuan selasa kemarin 2025-06-07 14:20:45 +07:00
core Ensure HTML path is a file, not a directory 2025-03-03 13:10:10 +07:00
modules/public change the default template 2024-06-05 23:27:52 +07:00
pages/public change the default template 2024-06-05 23:27:52 +07:00
static/css a template staticdir 2023-12-15 16:58:00 +07:00
templates/plain add plain templates 2024-08-09 15:44:57 +07:00
.gitignore Personal scratch directory 2025-03-11 14:09:51 +07:00
costa.py Add CORS configuration 2024-12-29 14:16:19 +07:00
handler.py Perubahan handler di pertemuan selasa kemarin 2025-06-07 14:20:45 +07:00
install.sh Start to implementing venv 2024-08-09 15:40:04 +07:00
LICENSE Create LICENSE 2022-03-16 11:15:58 +07:00
README.md Update README 2025-06-07 14:17:47 +07:00
README.md.bak Update README 2025-06-07 14:17:47 +07:00

Instalasi dan Implementasi Web API

  1. Install python
  2. Buka CMD atau Command-prompt
  3. cd nama/folder/costapy (di copy)
  4. Jalankan command ini di CMD:
py -m pip install --upgrade pip
py -m pip install bottle
py -m pip install beaker
py -m pip install mako
py -m pip install mysql-connector
py -m pip install bcrypt
py -m pip install pyjwt[crypto]
  1. Buka folder project pake VSCode
  2. Buka file di config/server.py
  3. servernya ganti dari 'gunicorn' ke 'wsgiref' (di save)
  4. di CMD jalanin: py costa.py
  5. kalau keluar http://localhost:11000 artinya berhasil
  6. Install bruno
  7. bikin collection
  8. test localhost:11000
  9. Praktek ke VSCode

Instalasi dan Implementasi MariaDB

Instalasi

Windows: Download dari mariadb.org atau dari xampp lalu install Mac: Install melalui brew Debian/Ubuntu: sudo apt install mariadb-server Alternative lain: Pakai container (Docker)

terminal: mariadb -u root -p MySQL Client Command Prompt: Buka MySQL client lalu masukan password

Implementasi

  1. CREATE DATABASE latihan;
  2. USE latihan;
  3. CREATE TABLE member ( id int(11) not null auto_increment primary key, name varchar(36) not null, phone varchar(14) null );
  4. SHOW COLUMNS FROM member;
  5. INSERT INTO member VALUES ( DEFAULT, 'Nama_Kalian', 'Telp_Kalian' );
  6. SELECT * FROM member;
  7. exit