Skip to content

SantGT5/kubes-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Books

Installation

Be sure you have installed

Nice to have - Postman

Start server

IMPORTANT:
Server runs on port 8000
Be sure port is available

$ git clone https://github.com/SantGT5/kubes-server.git
$ cd kubes-server
$ npm install

--- node ---
$ npm run dev

--- docker ---
$ npm run docker:compose

--> for more details, check "Available Scripts"

After server starts ( using node or docker ), the following success message appears from sever:

Screenshot 2023-03-01 at 23 10 33

Request & Response

Having server running, Postman will help us to use our API.

To do so, open a new POST request using the following URL & Body:

URL -->
http://localhost:8000/v1/books

Json Body -->
{
	"query":  "Harry Potter"
}

Screenshot 2023-03-01 at 23 56 17

Available Scripts

  • $ npm run compile clean the atual build & compile TypeScript project in the ./dist directory.

  • $ npm run dev monitors project, using nodemon, in the ./server directory & automatically restart application when it detects changes.

  • $ npm run docker:build builds a Docker image from a Dockerfile naming santgt5/kubes-server

  • $ npm run docker:run create a running container from the build image santgt5/kubes-server

  • $ npm run docker:compose build & run image exposing on port 8000

  • $ npm run prettier:format code formatter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors