Giter Club home page Giter Club logo

named-api's Introduction

[API] Named

GitHub Workflow Status (branch) GitHub go.mod Go version coverage MIT License PRs Welcome
Run in Insomnia}

Responsible for provide data to the web front-end. Generates names based on preseted datasets (list of example names), but you can upload a custom dataset (it must have at least 23 names). Was utilized the Markov Chain algorithm to generate the names, a custom script was created based on this article: Generating Startup names with Markov Chains.

Live Demo: https://named-api.onrender.com/

Table of Contents

Requirements

Usage

To start up the app run:

$ go run .

Or:

go run main.go

Or even:

$ ./scripts/run.sh

Routes

route HTTP Method params description
/datasets GET - Retrieve available datasets.
/names GET dataset query parameter. Generate names for the dataset provided.
/feedbacks POST Body with an array of feedbacks with name and value. Save good feedbacks
/upload POST Body with dataset form data (See insomnia file for good example). Create a custom dataset.

Requests

  • POST /feedbacks

Request body:

[
  {
    "name": "Jordan",
    "value": 1
  }
]
  • POST /upload

Request body:

"file"=<file>

Running the tests

To run the projects' tests the app:

$ ./scripts/test.sh

Or:

$ go test ./tests/... -cover -coverpkg=./controllers,./helpers -coverprofile=coverage-report.out

Coverage report

You can see the coverage report on root folder coverage-report.out. They are automatically created after the tests run (with you used the command above).

named-api's People

Contributors

diegovictor avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

named-api's Issues

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.