Giter Site home page Giter Site logo

poc-characterapi-ts's Introduction

poc-characterapi-ts

This is a simple proof of concept API written in TypeScript for managing characters.

Endpoints

GET /characters: Retrieves a list of all characters

GET /characters/:id: Retrieves a specific character by ID

POST /characters: Creates a new character

PUT /characters/:id: Updates an existing character

DELETE /characters/:id: Deletes a character

Installation

Clone the repository: git clone https://github.com/yuridesideri/poc-characterapi-ts.git

Install dependencies: npm install

Run Postgres

Dump the database from ./dump/dump.sql

Rename .env.example to .env

Insert into .env your database string ex: postgres://postgres:password@localhost:5432/database_name and set your port default is 4000

Start the server: npm run dev

Usage

The API can be accessed at http://localhost:4000. (Default)

In the Route: POST /characters - Creates a new character, it needs those fields:

 {
    "name": "The Child",
    "race": "Tridactyls",
    "description": "O baby Yoda, simplesmente o melhor personagem de todos os tempos",
    "age": "900",
    "height": "42",
    "u_obj": "jedi_suite",
    "sex": "male",
    "image": "https://media.vanityfair.com/photos/5dd70131e78810000883f587/4:3/w_1115,h_836,c_limit/baby-yoda-craze.jpg" //optional
  }

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

poc-characterapi-ts's People

Contributors

yuridesideri avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.