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
// app.vue | |
<template> | |
<div id="app"> | |
<img alt="Vue logo" src="./assets/logo.png"> | |
<HelloWorld msg="Welcome to Your Vue.js App"/> | |
</div> | |
</template> | |
<script> |
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
// src/main.js | |
import Vue from 'vue' | |
import App from './App.vue' | |
import VueMeta from 'vue-meta' | |
Vue.config.productionTip = false | |
Vue.use(VueMeta, { | |
// optional pluginOptions |
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
// vue.config.js | |
module.exports = { | |
pluginOptions: { | |
prerenderSpa: { | |
registry: undefined, | |
renderRoutes: [ | |
'/' | |
], | |
useRenderEvent: true, |
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
# prerender tool | |
# add an extra module to our vue project to be able to generate the meta tags. | |
vue add prerender-spa | |
# meta plugin | |
# install a complement to inject header attributes on our vue app. | |
npm i vue-meta --save |
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
'use strict' | |
const Env = use('Env') | |
const Logger = use('Logger') | |
class AuthController { | |
/** | |
* Login user controller | |
* @param {Object} request : HTTP Request | |
* @param {Object} response : HTTP Request |
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
# Crear controlador | |
adonis make:controller Auth |
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
// Ejecutamos pruebas | |
adonis test |
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
'use strict' | |
// Importamos test y trait para poder realizar consultas a la api | |
const { test, trait } = use('Test/Suite')('User Login') | |
trait('Test/ApiClient') | |
// Models | |
const User = use('App/Models/User') | |
// user template |
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
# Creamos prueba funcional | |
adonis make:test UserLogin --unit |
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
adonis install @adonisjs/vow |
NewerOlder