mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-23 12:40:19 +01:00
added numprocs
This commit is contained in:
parent
d78f5b0872
commit
8ed9a5d5ca
1 changed files with 8 additions and 2 deletions
|
@ -29,15 +29,17 @@ import (
|
|||
// _ "transfer.sh/app/utils"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/PuerkitoBio/ghost/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
"log"
|
||||
"math/rand"
|
||||
"mime"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/PuerkitoBio/ghost/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
const SERVER_INFO = "transfer.sh"
|
||||
|
@ -73,6 +75,10 @@ func init() {
|
|||
func main() {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
|
||||
nCPU := runtime.NumCPU()
|
||||
runtime.GOMAXPROCS(nCPU)
|
||||
fmt.Println("Number of CPUs: ", nCPU)
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
||||
r.PathPrefix("/scripts/").Methods("GET").Handler(http.FileServer(http.Dir("./static/")))
|
||||
|
|
Loading…
Reference in a new issue