serve

Start the NCMGET HTTP API server powered by Hono.

Usage

ncmget serve [options]

Options

OptionFlagDefaultDescription
Port-p, --port <port>3000Server listening port
Host-h, --host <host>0.0.0.0Server listening host
Logger--loggerfalseEnable request logging

Examples

Start with defaults

ncmget serve

Starts the server at http://0.0.0.0:3000.

Custom port

ncmget serve -p 8080

Starts the server at http://0.0.0.0:8080.

Custom host and port

ncmget serve -h 127.0.0.1 -p 8080

Starts the server at http://127.0.0.1:8080.

Enable logging

ncmget serve --logger

Logs each incoming request to the console.

Output

When the server starts, it displays the listening address:

Server running at http://0.0.0.0:3000

Available Endpoints

Once running, the following REST endpoints are available:

EndpointDescription
GET /searchSearch for music
GET /songGet song details
GET /albumGet album songs
GET /artistGet artist hot songs
GET /playlistGet playlist songs
GET /urlGet audio URL
GET /lrcGet lyrics
GET /picGet cover image URL
GET /List all routes

See HTTP Server for detailed endpoint documentation.