Giter Club home page Giter Club logo

example's Introduction

example

This repository is a collection of Fastify project that can be used to understand how-to archive commons problems and requirements.

Every directory is a stand alone project that you can read to undestand how it works and how it is configured.

Projects

Here a list of the projects with a description, search in this page what you are looking for

Project Tags Description
authentication authentication session Example how to do authentication with fastify-session
validation-messages schema validation How you can customize the error messages of input schema validation
winston-logger logger Example how to use winston as a custom logger
typescript decorators typescript Example how to use typescript decorators to build application
fastify postgres postgres crud Simple CRUD app that show how integrate fastify with database, with 100% test coverage
[tests] tests Example of how to test your fastify application

External Projects

Here a list of external projects that could be useful to find some tips and suggestions

Project Tags Description

Contributions

PR are welcome! Consider that a project to be added to this repository needs to have:

  • A README.md file that exaplain the project itself
  • Prefer a readable code, instead of concise
  • Comments on code that explain some code if there are more difficult parts
  • At least one test that show how to test the main function of the project

License

Licensed under MIT.

example's People

Contributors

codershiba avatar dancastillo avatar delvedor avatar eomm avatar fdawgs avatar is2ei avatar jsumners avatar l2jliga avatar luisorbaiceta avatar mandaputtra avatar mcollina avatar rafaelgss avatar reeveng avatar serayaeryn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

example's Issues

Contribution to the project

Hey guys!!!, I would like to contribute to the repository, I would like to put together one. architecture using fastify with vuejs, has some sample design ideas that you want to use or want to exemplify. I'm really enjoying the project and wanted to contribute somehow.

Add github PR template

add a github template with all the checks that an example project must satisfy based on the actual readme project

custom-errors-message doesn't work?

Hi.
What am I doing wrong?
I got examples of the code from here -- https://github.com/fastify/fastify/blob/main/docs/Reference/Validation-and-Serialization.md#schemaerrorformatter

import ajvErrors from "ajv-errors";

const app = fastify({
  ajv: {
    customOptions: {
      jsonPointers: true,
      allErrors: true
    },
    plugins: [ajvErrors],
  },
}

const itemSchemaTpl = {
  type: "object",
  properties: {
    id: { type: "string" },
    title: { type: "string"},
  },
  required: ["id", "title"],
  errorMessage: {
    required: {
      title: "SHIIIIIT",
    },
  },
};
app.get("/items/:id", {
  schema: {
    response: {
      200:  itemSchemaTpl,
    },
  },
  handler: (req, res) => res.send({id:"2"})
});

Response is {"statusCode":500,"error":"Internal Server Error","message":""title" is required!"}
BUT I expected message - SHIIIIIT

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.