Giter VIP home page Giter VIP logo

api-std-lib's People

Contributors

youngjun827 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

api-std-lib's Issues

Use slog for Logging

Evaluate the new slog package for logging as an alternative to the standard log package.

Improve Makefile

Project is containerized thus, I need to update update makefile so others can run the project using docker containers

IP Address Handling in Rate Limiter

The current rate limiter blindly trusts r.RemoteAddr for the IP address. Implement a more robust method for correctly identifying IP addresses.

Unnecessary r.Body Close

The r.Body is being closed manually in controllers, which is unnecessary as the server handles this.

Package Naming and Structure

The utility package needs to be broken down into more appropriately-named packages. For example, rate limiting logic could go into a package named rate, and validation helpers could go into a package named validate.

Logging to stdout and stderr

The current implementation always logs output to files. Change it to log to stdout and stderr, so the user can redirect it to files or any other destination as needed.

Create Custom http.Server Instance

Replace the current usage of http.ListenAndServe with creating a custom http.Server instance for better control over timeouts and other settings.

Use Custom Serve Mux for Routes

Currently, the default serve mux from the http package is being used. Implement a custom serve mux for better control and security.

Validation Logic in Controllers

Reconsider the current validation logic shared across controllers. Potentially separate this into individual responsibilities for each controller.

Mutex in Rate Limiter

The rate limiter is currently using a global mutex, causing requests to be processed sequentially. Optimize this for parallel processing.

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.