(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
| <template> | |
| <div class="abuelo-component"> | |
| <h1>Abuelo</h1> | |
| <padre></padre> | |
| </div> | |
| </template> | |
| <script> | |
| import {EventBus} from './event-bus' | |
| import Padre from './Padre' // Padre.vue | |
| export default { |
| <template> | |
| <div class="padre-component"> | |
| <h1>Padre</h1> | |
| <hijo></hijo> | |
| <button @click.prevent="emitirEventoPadre"></button> | |
| </div> | |
| </template> | |
| <script> | |
| import {EventBus} from './event-bus' | |
| import Hijo from './Hijo' // Hijo.vue |
| <template> | |
| <div class="hijo-component"> | |
| <h1>Hijo</h1> | |
| <button @click.prevent="emitirEventoHijo"></button> | |
| </div> | |
| </template> | |
| <script> | |
| import {EventBus} from './event-bus' | |
| export default { | |
| name: 'Hijo', |
| <template> | |
| <div class="card graph-card"> | |
| <h5 class="card-header">Usuarios activo e inactivos</h5> | |
| <div class="card-body" v-loading="isLoading"> | |
| <div ref="chart"></div> | |
| </div> | |
| </div> | |
| </template> | |
| <script> |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
| # Start all dockers based on Id. | |
| $ docker ps -a --format="{{.ID}}" | xargs docker [option](start | stop) | |
| # Remove all docker containers | |
| $ docker ps -a --format="{{.ID}}" | xargs docker rm -f |
| /* | |
| * Getting Started | |
| * $ yarn add mysql faker moment | |
| * $ npm i -S mysql faker moment | |
| * $ node index.js | |
| */ | |
| const mysql = require('mysql') | |
| const faker = require('faker') | |
| const moment = require('moment') |
| const mysql = require('mysql') | |
| const express = require('express') | |
| const app = express() | |
| app.use(express.json()) | |
| app.use(express.urlencoded({ extended: false })) | |
| // Connection database | |
| const connection = mysql.createConnection({ |
| # Creating a MongoDB container with the mongo latest version. | |
| docker pull mongo | |
| docker run --name mongo-database -d -p 27017:27017 mongo --noauth --bind_ip=0.0.0.0 | |
| docker ps | |
| # Creating a MySQL container with the mysql:5.7 version. | |
| docker pull mysql:5.7 | |
| docker run -d -p 3306:3306 --name mysql-database -e MYSQL_ROOT_PASSWORD=root mysql:5.7 |
| Vue.component('increment-button', { | |
| props: { | |
| count: { | |
| type: Number, | |
| default: 0, | |
| }, | |
| }, | |
| template: ` | |
| <div> | |
| <p>Count: {{ numberCount }}</p> |