GithubHelp home page GithubHelp logo

hermit-server's Introduction

Hermit Server



                 




Hermit server is a stack that integrates various developer friendly technologies to create the ultimate dev experience.

Prisma

The schema located at src/hermit/prisma/schema.prisma will auto generate database migrations, a type-safe client, and typescript type definitions for you.

Apollo Server

Using apollo-express, Hermit exposes a graph at the path /graphql. Thanks to prisma and graphql-codegen, the resolvers located at src/hermit/services/apollo/resolvers.ts are fully typed.

Testing

When you run npm test, hermit uses ts-jest in order to run tests. A new environment is created behind the scenes for every spec file, so that each spec is ran in complete isolation. Jest calculates the code coverage and makes it available under test/coverage.

Ci-Cd

Using Github Actions and Heroku pipelines, the workflow is the following:

  • Commit to your feature branch
  • Open a PR from feature branch into main
  • Automated tests will run in Github, and coverage 100% is enforced : )
  • Once a PR is merged to main, the code will auto deploy to a staging environment
  • Using the Heroku pipelines dashboard you can promote to production with a single click

Debug

To debug using vscode, simply place a breakpoint and then open package.json. Locate the script you would like to debug, click on Debug, and choose the appropriate script in the dropdown. You can debug both "start" and "test" programs.

hermit-server's People

Contributors

svegalopez avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

hermit-server's Issues

Implement auth system using REST

see demo in guides.

  • http endpoints (3)
  • middleware
  • one of the routes is protected with the middleware
  • add extra layer of security by creating a UserLogin model and using cookies.

Create missing edpoints

Create the endpoints necessary for user management:

  • update a user and its roles

  • list users and its roles

  • create a role

  • list roles

  • add a role to a list of users

Protect the Query.users field

Currently, the query.users field is open to whoever is authenticated.
Make it so that only admins can access this field.

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.