Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "log"
- "nama_npm_pert4/handler" //sesuaikan dengan nama folder (case sensitive)
- "net/http"
- )
- func main() {
- http.HandleFunc("/api/", handler.API)
- //Ganti 2 digit akhir port dengan 2 digit akhir NPM anda
- log.Println("localhost : 8001")
- http.ListenAndServe(":8001", nil)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement