gotranseo / template Goto Github PK
View Code? Open in Web Editor NEWThe Vapor 3 Template Used at Transeo
Home Page: https://gotranseo.com
License: MIT License
The Vapor 3 Template Used at Transeo
Home Page: https://gotranseo.com
License: MIT License
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.
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.