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 Vue from 'vue' | |
import VueRouter from 'vue-router'; | |
import VueResource from 'vue-resource'; | |
import ToggleButton from 'vue-js-toggle-button'; | |
//import VueCharts from 'vue-chartjs'; | |
import { routes } from './routes.js'; | |
import App from './App.vue' | |
import {store} from './components/user/store/storeLogin.js'; |
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
Servidor: | |
passport.js | |
var passport = require('passport'); | |
var FacebookStrategy = require('passport-facebook').Strategy; | |
var mongoose = require('mongoose'); | |
var configAuth = require('./auth'); | |
module.exports = () => { |
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
0 info it worked if it ends with ok | |
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ] | |
2 info using npm@2.15.5 | |
3 info using node@v4.4.5 | |
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] | |
5 info prebuild cliente@ | |
6 info build cliente@ | |
7 verbose unsafe-perm in lifecycle true | |
8 info cliente@ Failed to exec build script | |
9 verbose stack Error: cliente@ build: `cross-env NODE_ENV=production webpack --progress --hide-modules` |
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
//cria variaveis de estado para todos os componentes filhos terem acesso | |
const state = { | |
info: [], | |
objetoInfo: [], | |
infoAtual: '' | |
} | |
//Cria objetos para armazenar todas as mutações das variaveis state | |
const mutations = { | |
INCREMENTINFO (state, valor) { |
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
<script> | |
import { incrementInfo } from '../../vuex/actions' | |
console.log(incrementInfo) | |
export default { | |
props: { | |
item: Object | |
}, | |
vuex: { | |
actions: { | |
incrementInfo |
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
Esse é o arquivo store.js | |
import Vue from 'vue' | |
import Vuex from 'vuex' | |
//Indica para o Vue utilizar o vuex | |
Vue.use(Vuex) | |
//cria variaveis de estado para todos os componentes filhos terem acesso | |
const state = { | |
info: [] |
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
mains.js | |
import Vue from 'vue' | |
//Subcomponentes de Create.vue | |
import Item from './components/create/Timelineitem.vue' | |
Vue.component('item', { | |
template: Item | |
}) |
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
<template> | |
<div class="col-md-6 col-md-offset-3"> | |
<h4>Cadastre um lugar que você já foi e deixe um comentário</h4> | |
<div class="alert alert-danger" v-if="error"> | |
<p>{{ error }}</p> | |
</div> | |
<form class="" @submit.prevent="salva()"> | |
<div class="form-group"> | |
<input type="text" class="form-control" placeholder="Entre com o titulo" v-model="lugares.titulo"> | |
</div> |
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
SCHEMA MONGOO: | |
var mongoose = require('mongoose'); | |
module.exports = function () { | |
var schema = mongoose.Schema({ | |
origin: { | |
type: String, |
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
cd ~ | |
##If you want to install OpenJDK | |
#sudo apt-get update | |
#sudo apt-get install openjdk-8-jre-headless -y | |
###Or if you want to install Oracle JDK, which seems to have slightly better performance | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer |
NewerOlder