Advertisement
Uhuuuyy

main.go

May 23rd, 2023
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.31 KB | Source Code | 0 0
  1. package main
  2.  
  3. import (
  4.     "log"
  5.     "nama_npm_pert4/handler" //sesuaikan dengan nama folder (case sensitive)
  6.     "net/http"
  7. )
  8.  
  9. func main() {
  10.     http.HandleFunc("/api/", handler.API)
  11.     //Ganti 2 digit akhir port dengan 2 digit akhir NPM anda
  12.     log.Println("localhost : 8001")
  13.     http.ListenAndServe(":8001", nil)
  14. }
  15.  
Tags: inter4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement