Git Product home page Git Product logo

template's People

Contributors

jdmcd avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

zemskix

template's Issues

How to use the repository pattern

http://docs.vapor.codes/3.0/extras/style-guide/

There are a few benefits to this method. First, it makes testing a lot easier. This is because during the test environment you can easily utilize Vapor’s configuration abilities to swap out which implementation of the repository protocol gets used. This makes unit testing much faster because the unit tests can use a memory version of the protocol rather than the database. The other large benefit to this pattern is that it makes it really easy to switch out the database layer if needed. Because all of the ORM logic is abstracted to this piece of the application (and the controllers don’t know it exists) you could realistically swap out Fluent with a different ORM with minimal changes to your actual application/business logic code. This also means that you could switch out the specific database used during testing (i.e. using SQLite instead of MySQL). However, this strategy requires extra work to make your models generic as they can no longer conform the the specific database model types (e.g. MySQLModel).

If you run swift test, how to do it.

Error 500

Hi Team

I'm download and build your template, but I can run the app. On the console I see:

[ INFO ] Migrating 'mysql' database (/Users/.../Desktop/TranseoTestTemplate/.build/checkouts/fluent/Sources/Fluent/Migration/MigrationConfig.swift:69)
⚠️ [Abort.500: Internal Server Error] [/Users/.../Desktop/TranseoTestTemplate/Sources/App/Setup/databases.swift:14:88]
Program ended with exit code: 1

can you help me to fix this?
thanks

Post Issues

Hello, me again.. .sorry.

So, After I configure all, I will start to validate the POST calls for login/register, but, I have always the same response: FORBIDDEN

[ INFO ] Migrating 'mysql' database .../Sources/Fluent/Migration/MigrationConfig.swift:69)
[ INFO ] Migrations complete .../Sources/Fluent/Migration/MigrationConfig.swift:73)
Server starting on http://localhost:8080
[ ERROR ] Forbidden (.../Sources/App/Middleware/TranseoErrorMiddleware.swift:84)

what the csrf param request is? why we need?

This is the post call:
curl -H "Content-Type: application/json" -X POST -d '{"email":"[email protected]", "password": "link", "confirmPassword": "link", "name": "Zelda Testing", "csrf": "CSFRTest"}' http://localhost:8080/register

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.