1、nodejs编写HelloWord,了解什么是nodejs,nodejs有什么特点
2、nodejs的模块怎么用,如何载入别的模块(require),如何给另一模块调用(module, module.exports),自己编写的模块与
node_modules下模块有什么区别,载入顺序是怎样的;自己写一个编写nodejs的一个模块;
3、npm是什么,npm工具如何使用
npm install
npm init
npm install xxx
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 Koa from 'koa' | |
import parse from './busboy' | |
import AWS from 'aws-sdk' | |
const app = new Koa() | |
const s3 = new AWS.S3({ | |
params: { Bucket: 'myBucket' } | |
}) |
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 VueResource from 'vue-resource'; | |
import utils from './utils'; | |
import local from './local'; | |
import toast from './toast'; | |
Vue.use(VueResource); | |
// Usage |
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 Vuejs | |
*/ | |
import Vue from 'vue' | |
/** | |
* import axios | |
* | |
* Usage of Axios | |
* https://github.com/mzabriskie/axios |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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 Pikaday from 'pikaday'; | |
const today = new Date(), | |
i18n = { | |
previousMonth: '上月', | |
nextMonth: '下月', | |
months: [ | |
'一月', | |
'二月', |
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 Vue from 'vue'; | |
import Ajax from '../utils/ajax'; | |
import Modal from './modal.vue'; | |
let httpRes = {}; | |
export default { | |
props: { |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder