Skip to content

Instantly share code, notes, and snippets.

View adrai's full-sized avatar

Adriano Raiano adrai

View GitHub Profile
@adrai
adrai / app.js
Created August 27, 2018 17:19
vue-i18next
/* eslint-disable no-undef, new-cap */
i18next
.use(i18nextXHRBackend)
.use(i18nextBrowserLanguageDetector)
.init({
fallbackLng: 'en',
backend: {
loadPath: '../locales/{{lng}}/{{ns}}.json'
},
ns: ['translations'],
@adrai
adrai / app.js
Created June 5, 2021 22:30
vue-i18next for vue v3
const i18nextPromise = i18next.use(i18nextHttpBackend).init({
debug: true,
lng: 'en',
fallbackLng: 'en',
backend: {
loadPath: './locales/{{lng}}/{{ns}}.json'
}
});
const app = Vue.createApp({});
@adrai
adrai / dummyTest.js
Last active January 11, 2022 09:26
aws-lambda-fastify (ESM optimization)
// import { handler } from './lambda.js' // let's import it dynamically, so we can measure...
const evt = {
httpMethod: 'GET',
path: '/test',
headers: {}
}
const ctx = {}
let st = Date.now()