adonis install adonis-acl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'tipsi-stripe' { | |
export interface StripeOptions { | |
publishableKey: string | |
merchantId?: string | |
androidPayMode?: string | |
} | |
export type AccountHolderType = 'company' | 'individual' | |
export type PaymentMethodAddress = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FakeComponent = () => { | |
return ( | |
<AnimatedRoutes exitBeforeEnter initial={false}> | |
<RouteTransition exact path="/some-route"> | |
<NewUsers /> | |
</RouteTransition> | |
<RouteTransition exact path="/yo" > | |
<Users /> | |
</RouteTransition> | |
</AnimatedRoutes> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Knex } from 'knex' | |
export async function up(knex: Knex): Promise<any> { | |
await knex.schema.createTable('test_setup', (table: Knex.TableBuilder) => { | |
table.integer('foobar'); | |
}); | |
} | |
export async function down(knex: Knex): Promise<any> { | |
await knex.schema.dropTable('test_setup'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nodemailer = require('nodemailer'); | |
var sesTransport = require('nodemailer-ses-transport'); | |
var smtpPassword = require('aws-smtp-credentials'); | |
var mailOptions = { | |
from: '[email protected]', | |
to: '[email protected]', | |
text: 'This is some text', | |
html: '<b>This is some HTML</b>', | |
}; |