2020年9月16日 星期三

vue create Vue3 on 2020 September + Typescript

Vue 3

woirking on C:\d\lab\flaskw3html\19.vuejs\06.app

reference https://www.jianshu.com/p/e817141b1c8d


vue create vue3

Manual (not vue 2 default or vue 3 default)

On top of default Babel and Linter Formatter, add Router and Vuex

3.x (Preview) not 2.x

History mode n

linter choose Prettier (not error prevention only nor Airbnb nor Standard)

Lint on save (not fix on commit)

dedicated config files (not package.json)


顺便安装bootstra-vue

npm install bootstrap bootstrap-vue


now we can

cd vue3

npm run serve


Optionally modify package.json to add --port 8090 so that

"serve": "vue-cli-service serve -- port 8090",

beside package.json, create "npm.run.serve.bat"

start http://localhost:8090

npm run serve





main.js

import { createApp, Vue } from "vue";

import { BootstrapVue, IconsPlugin } from "bootstrap-vue";

Vue.use(BootstrapVue);

Vue.use(IconsPlugin);

import "bootstrap/dist/css/bootstrap.css";

import "bootstrap-vue/dist/bootstrap-vue.css";


https://stackoverflow.com/questions/63570340/how-to-use-vue-3-add-plugin-boostrap-vue

Bootstrap vue does not support Vue 3 on 2020 September yet


Conclusion:

Only Bootstrap-Vue does not work with Vue3. Others work include:

.env.development
import axios from "axios";
fetch("https://api.coindesk.com/v1/bpi/currentprice.json")
import _ from "lodash";
import Papa from "papaparse";
<script scoped>
import VuexPersist from "vuex-persist";
plugins: [vuexLocal.plugin]


Vuex is 99% the same except

import Vuex from "vuex";
Vue.use(Vuex);
export default new Vuex.Store()

becomes

import { createStore } from "vuex";
export default createStore()



How about Typescript?

vue create vue3

keep default Babel, select TypeScript VueX Router

3.x

No for class-style component syntax

Yes for Babel alongside TypeScript

No for router history mode


最重要的axios原本封装之后不知道如何import去另外一个VueX的index.ts!不能使用



asdsad


End

2020年9月15日 星期二

NodeJS ExpressJS Request Content from Axios

I have a VueJS 2 axios api call

axios.post("login", { username: this.username, password: this.password });


The NodeJS ExpressJS code is

app.post('/login', function (req, res) {

    console.log('req', req);

});


On the console


req IncomingMessage {

  _readableState: ReadableState {

    objectMode: false,

    highWaterMark: 16384,

    buffer: BufferList { head: null, tail: null, length: 0 },

    length: 0,

    pipes: null,

    pipesCount: 0,

    flowing: true,

    ended: true,

    endEmitted: true,

    reading: false,

    sync: false,

    needReadable: false,

    emittedReadable: false,

    readableListening: false,

    resumeScheduled: false,

    paused: false,

    emitClose: true,

    autoDestroy: false,

    destroyed: false,

    defaultEncoding: 'utf8',

    awaitDrain: 0,

    readingMore: false,

    decoder: null,

    encoding: null

  },

  readable: false,

  _events: [Object: null prototype] {

    end: [Function: resetHeadersTimeoutOnReqEnd]

  },

  _eventsCount: 1,

  _maxListeners: undefined,

  socket: Socket {

    connecting: false,

    _hadError: false,

    _parent: null,

    _host: null,

    _readableState: ReadableState {

      objectMode: false,

      highWaterMark: 16384,

      buffer: BufferList { head: null, tail: null, length: 0 },

      length: 0,

      pipes: null,

      pipesCount: 0,

      flowing: true,

      ended: false,

      endEmitted: false,

      reading: true,

      sync: false,

      needReadable: true,

      emittedReadable: false,

      readableListening: false,

      resumeScheduled: false,

      paused: false,

      emitClose: false,

      autoDestroy: false,

      destroyed: false,

      defaultEncoding: 'utf8',

      awaitDrain: 0,

      readingMore: false,

      decoder: null,

      encoding: null

    },

    readable: true,

    _events: [Object: null prototype] {

      end: [Array],

      timeout: [Function: socketOnTimeout],

      data: [Function: bound socketOnData],

      error: [Function: socketOnError],

      close: [Array],

      drain: [Function: bound socketOnDrain],

      resume: [Function: onSocketResume],

      pause: [Function: onSocketPause]

    },

    _eventsCount: 8,

    _maxListeners: undefined,

    _writableState: WritableState {

      objectMode: false,

      highWaterMark: 16384,

      finalCalled: false,

      needDrain: false,

      ending: false,

      ended: false,

      finished: false,

      destroyed: false,

      decodeStrings: false,

      defaultEncoding: 'utf8',

      length: 0,

      writing: false,

      corked: 0,

      sync: false,

      bufferProcessing: false,

      onwrite: [Function: bound onwrite],

      writecb: null,

      writelen: 0,

      afterWriteTickInfo: null,

      bufferedRequest: null,

      lastBufferedRequest: null,

      pendingcb: 0,

      prefinished: false,

      errorEmitted: false,

      emitClose: false,

      autoDestroy: false,

      bufferedRequestCount: 0,

      corkedRequestsFree: [Object]

    },

    writable: true,

    allowHalfOpen: true,

    _sockname: null,

    _pendingData: null,

    _pendingEncoding: '',

    server: Server {

      _events: [Object: null prototype],

      _eventsCount: 2,

      _maxListeners: undefined,

      _connections: 4,

      _handle: [TCP],

      _usingWorkers: false,

      _workers: [],

      _unref: false,

      allowHalfOpen: true,

      pauseOnConnect: false,

      httpAllowHalfOpen: false,

      timeout: 120000,

      keepAliveTimeout: 5000,

      maxHeadersCount: null,

      headersTimeout: 40000,

      _connectionKey: '4:0.0.0.0:20230',

      [Symbol(IncomingMessage)]: [Function: IncomingMessage],

      [Symbol(ServerResponse)]: [Function: ServerResponse],

      [Symbol(asyncId)]: 13

    },

    _server: Server {

      _events: [Object: null prototype],

      _eventsCount: 2,

      _maxListeners: undefined,

      _connections: 4,

      _handle: [TCP],

      _usingWorkers: false,

      _workers: [],

      _unref: false,

      allowHalfOpen: true,

      pauseOnConnect: false,

      httpAllowHalfOpen: false,

      timeout: 120000,

      keepAliveTimeout: 5000,

      maxHeadersCount: null,

      headersTimeout: 40000,

      _connectionKey: '4:0.0.0.0:20230',

      [Symbol(IncomingMessage)]: [Function: IncomingMessage],

      [Symbol(ServerResponse)]: [Function: ServerResponse],

      [Symbol(asyncId)]: 13

    },

    timeout: 120000,

    parser: HTTPParser {

      '0': [Function: parserOnHeaders],

      '1': [Function: parserOnHeadersComplete],

      '2': [Function: parserOnBody],

      '3': [Function: parserOnMessageComplete],

      '4': [Function: bound onParserExecute],

      _headers: [],

      _url: '',

      socket: [Circular],

      incoming: [Circular],

      outgoing: null,

      maxHeaderPairs: 2000,

      _consumed: true,

      onIncoming: [Function: bound parserOnIncoming],

      parsingHeadersStart: 1600144170273

    },

    on: [Function: socketListenerWrap],

    addListener: [Function: socketListenerWrap],

    prependListener: [Function: socketListenerWrap],

    _paused: false,

    _httpMessage: ServerResponse {

      _events: [Object: null prototype],

      _eventsCount: 1,

      _maxListeners: undefined,

      outputData: [],

      outputSize: 0,

      writable: true,

      _last: false,

      chunkedEncoding: false,

      shouldKeepAlive: true,

      useChunkedEncodingByDefault: true,

      sendDate: true,

      _removedConnection: false,

      _removedContLen: false,

      _removedTE: false,

      _contentLength: null,

      _hasBody: true,

      _trailer: '',

      finished: false,

      _headerSent: false,

      socket: [Circular],

      connection: [Circular],

      _header: null,

      _onPendingData: [Function: bound updateOutgoingData],

      _sent100: false,

      _expect_continue: false,

      req: [Circular],

      locals: [Object: null prototype] {},

      writeHead: [Function: writeHead],

      end: [Function: end],

      [Symbol(kNeedDrain)]: false,

      [Symbol(isCorked)]: false,

      [Symbol(kOutHeaders)]: [Object: null prototype]

    },

    _peername: { address: '127.0.0.1', family: 'IPv4', port: 51058 },

    [Symbol(asyncId)]: 1341,

    [Symbol(kHandle)]: TCP {

      reading: true,

      onconnection: null,

      _consumed: true,

      [Symbol(owner)]: [Circular]

    },

    [Symbol(lastWriteQueueSize)]: 0,

    [Symbol(timeout)]: Timeout {

      _idleTimeout: 120000,

      _idlePrev: [TimersList],

      _idleNext: [Timeout],

      _idleStart: 32355,

      _onTimeout: [Function: bound ],

      _timerArgs: undefined,

      _repeat: null,

      _destroyed: false,

      [Symbol(refed)]: false,

      [Symbol(asyncId)]: 1376,

      [Symbol(triggerId)]: 1343

    },

    [Symbol(kBuffer)]: null,

    [Symbol(kBufferCb)]: null,

    [Symbol(kBufferGen)]: null,

    [Symbol(kBytesRead)]: 0,

    [Symbol(kBytesWritten)]: 0

  },

  connection: Socket {

    connecting: false,

    _hadError: false,

    _parent: null,

    _host: null,

    _readableState: ReadableState {

      objectMode: false,

      highWaterMark: 16384,

      buffer: BufferList { head: null, tail: null, length: 0 },

      length: 0,

      pipes: null,

      pipesCount: 0,

      flowing: true,

      ended: false,

      endEmitted: false,

      reading: true,

      sync: false,

      needReadable: true,

      emittedReadable: false,

      readableListening: false,

      resumeScheduled: false,

      paused: false,

      emitClose: false,

      autoDestroy: false,

      destroyed: false,

      defaultEncoding: 'utf8',

      awaitDrain: 0,

      readingMore: false,

      decoder: null,

      encoding: null

    },

    readable: true,

    _events: [Object: null prototype] {

      end: [Array],

      timeout: [Function: socketOnTimeout],

      data: [Function: bound socketOnData],

      error: [Function: socketOnError],

      close: [Array],

      drain: [Function: bound socketOnDrain],

      resume: [Function: onSocketResume],

      pause: [Function: onSocketPause]

    },

    _eventsCount: 8,

    _maxListeners: undefined,

    _writableState: WritableState {

      objectMode: false,

      highWaterMark: 16384,

      finalCalled: false,

      needDrain: false,

      ending: false,

      ended: false,

      finished: false,

      destroyed: false,

      decodeStrings: false,

      defaultEncoding: 'utf8',

      length: 0,

      writing: false,

      corked: 0,

      sync: false,

      bufferProcessing: false,

      onwrite: [Function: bound onwrite],

      writecb: null,

      writelen: 0,

      afterWriteTickInfo: null,

      bufferedRequest: null,

      lastBufferedRequest: null,

      pendingcb: 0,

      prefinished: false,

      errorEmitted: false,

      emitClose: false,

      autoDestroy: false,

      bufferedRequestCount: 0,

      corkedRequestsFree: [Object]

    },

    writable: true,

    allowHalfOpen: true,

    _sockname: null,

    _pendingData: null,

    _pendingEncoding: '',

    server: Server {

      _events: [Object: null prototype],

      _eventsCount: 2,

      _maxListeners: undefined,

      _connections: 4,

      _handle: [TCP],

      _usingWorkers: false,

      _workers: [],

      _unref: false,

      allowHalfOpen: true,

      pauseOnConnect: false,

      httpAllowHalfOpen: false,

      timeout: 120000,

      keepAliveTimeout: 5000,

      maxHeadersCount: null,

      headersTimeout: 40000,

      _connectionKey: '4:0.0.0.0:20230',

      [Symbol(IncomingMessage)]: [Function: IncomingMessage],

      [Symbol(ServerResponse)]: [Function: ServerResponse],

      [Symbol(asyncId)]: 13

    },

    _server: Server {

      _events: [Object: null prototype],

      _eventsCount: 2,

      _maxListeners: undefined,

      _connections: 4,

      _handle: [TCP],

      _usingWorkers: false,

      _workers: [],

      _unref: false,

      allowHalfOpen: true,

      pauseOnConnect: false,

      httpAllowHalfOpen: false,

      timeout: 120000,

      keepAliveTimeout: 5000,

      maxHeadersCount: null,

      headersTimeout: 40000,

      _connectionKey: '4:0.0.0.0:20230',

      [Symbol(IncomingMessage)]: [Function: IncomingMessage],

      [Symbol(ServerResponse)]: [Function: ServerResponse],

      [Symbol(asyncId)]: 13

    },

    timeout: 120000,

    parser: HTTPParser {

      '0': [Function: parserOnHeaders],

      '1': [Function: parserOnHeadersComplete],

      '2': [Function: parserOnBody],

      '3': [Function: parserOnMessageComplete],

      '4': [Function: bound onParserExecute],

      _headers: [],

      _url: '',

      socket: [Circular],

      incoming: [Circular],

      outgoing: null,

      maxHeaderPairs: 2000,

      _consumed: true,

      onIncoming: [Function: bound parserOnIncoming],

      parsingHeadersStart: 1600144170273

    },

    on: [Function: socketListenerWrap],

    addListener: [Function: socketListenerWrap],

    prependListener: [Function: socketListenerWrap],

    _paused: false,

    _httpMessage: ServerResponse {

      _events: [Object: null prototype],

      _eventsCount: 1,

      _maxListeners: undefined,

      outputData: [],

      outputSize: 0,

      writable: true,

      _last: false,

      chunkedEncoding: false,

      shouldKeepAlive: true,

      useChunkedEncodingByDefault: true,

      sendDate: true,

      _removedConnection: false,

      _removedContLen: false,

      _removedTE: false,

      _contentLength: null,

      _hasBody: true,

      _trailer: '',

      finished: false,

      _headerSent: false,

      socket: [Circular],

      connection: [Circular],

      _header: null,

      _onPendingData: [Function: bound updateOutgoingData],

      _sent100: false,

      _expect_continue: false,

      req: [Circular],

      locals: [Object: null prototype] {},

      writeHead: [Function: writeHead],

      end: [Function: end],

      [Symbol(kNeedDrain)]: false,

      [Symbol(isCorked)]: false,

      [Symbol(kOutHeaders)]: [Object: null prototype]

    },

    _peername: { address: '127.0.0.1', family: 'IPv4', port: 51058 },

    [Symbol(asyncId)]: 1341,

    [Symbol(kHandle)]: TCP {

      reading: true,

      onconnection: null,

      _consumed: true,

      [Symbol(owner)]: [Circular]

    },

    [Symbol(lastWriteQueueSize)]: 0,

    [Symbol(timeout)]: Timeout {

      _idleTimeout: 120000,

      _idlePrev: [TimersList],

      _idleNext: [Timeout],

      _idleStart: 32355,

      _onTimeout: [Function: bound ],

      _timerArgs: undefined,

      _repeat: null,

      _destroyed: false,

      [Symbol(refed)]: false,

      [Symbol(asyncId)]: 1376,

      [Symbol(triggerId)]: 1343

    },

    [Symbol(kBuffer)]: null,

    [Symbol(kBufferCb)]: null,

    [Symbol(kBufferGen)]: null,

    [Symbol(kBytesRead)]: 0,

    [Symbol(kBytesWritten)]: 0

  },

  httpVersionMajor: 1,

  httpVersionMinor: 1,

  httpVersion: '1.1',

  complete: true,

  headers: {

    host: 'localhost:20230',

    connection: 'keep-alive',

    'content-length': '32',

    accept: 'application/json, text/plain, */*',

    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102

 Safari/537.36',

    'content-type': 'application/json;charset=UTF-8',

    origin: 'http://localhost:20727',

    'sec-fetch-site': 'same-site',

    'sec-fetch-mode': 'cors',

    'sec-fetch-dest': 'empty',

    referer: 'http://localhost:20727/',

    'accept-encoding': 'gzip, deflate, br',

    'accept-language': 'zh-CN,zh;q=0.9',

    cookie: 'connect.sid=s%3A6D00jCBjQVjI9oxdDVaixKe_59saqDp1.QktqxPSzbyr6uflfUP7pxzAV18FaV7Cj3b20db0jlHI'

  },

  rawHeaders: [

    'Host',

    'localhost:20230',

    'Connection',

    'keep-alive',

    'Content-Length',

    '32',

    'Accept',

    'application/json, text/plain, */*',

    'User-Agent',

    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36

',

    'Content-Type',

    'application/json;charset=UTF-8',

    'Origin',

    'http://localhost:20727',

    'Sec-Fetch-Site',

    'same-site',

    'Sec-Fetch-Mode',

    'cors',

    'Sec-Fetch-Dest',

    'empty',

    'Referer',

    'http://localhost:20727/',

    'Accept-Encoding',

    'gzip, deflate, br',

    'Accept-Language',

    'zh-CN,zh;q=0.9',

    'Cookie',

    'connect.sid=s%3A6D00jCBjQVjI9oxdDVaixKe_59saqDp1.QktqxPSzbyr6uflfUP7pxzAV18FaV7Cj3b20db0jlHI'

  ],

  trailers: {},

  rawTrailers: [],

  aborted: false,

  upgrade: false,

  url: '/login',

  method: 'POST',

  statusCode: null,

  statusMessage: null,

  client: Socket {

    connecting: false,

    _hadError: false,

    _parent: null,

    _host: null,

    _readableState: ReadableState {

      objectMode: false,

      highWaterMark: 16384,

      buffer: BufferList { head: null, tail: null, length: 0 },

      length: 0,

      pipes: null,

      pipesCount: 0,

      flowing: true,

      ended: false,

      endEmitted: false,

      reading: true,

      sync: false,

      needReadable: true,

      emittedReadable: false,

      readableListening: false,

      resumeScheduled: false,

      paused: false,

      emitClose: false,

      autoDestroy: false,

      destroyed: false,

      defaultEncoding: 'utf8',

      awaitDrain: 0,

      readingMore: false,

      decoder: null,

      encoding: null

    },

    readable: true,

    _events: [Object: null prototype] {

      end: [Array],

      timeout: [Function: socketOnTimeout],

      data: [Function: bound socketOnData],

      error: [Function: socketOnError],

      close: [Array],

      drain: [Function: bound socketOnDrain],

      resume: [Function: onSocketResume],

      pause: [Function: onSocketPause]

    },

    _eventsCount: 8,

    _maxListeners: undefined,

    _writableState: WritableState {

      objectMode: false,

      highWaterMark: 16384,

      finalCalled: false,

      needDrain: false,

      ending: false,

      ended: false,

      finished: false,

      destroyed: false,

      decodeStrings: false,

      defaultEncoding: 'utf8',

      length: 0,

      writing: false,

      corked: 0,

      sync: false,

      bufferProcessing: false,

      onwrite: [Function: bound onwrite],

      writecb: null,

      writelen: 0,

      afterWriteTickInfo: null,

      bufferedRequest: null,

      lastBufferedRequest: null,

      pendingcb: 0,

      prefinished: false,

      errorEmitted: false,

      emitClose: false,

      autoDestroy: false,

      bufferedRequestCount: 0,

      corkedRequestsFree: [Object]

    },

    writable: true,

    allowHalfOpen: true,

    _sockname: null,

    _pendingData: null,

    _pendingEncoding: '',

    server: Server {

      _events: [Object: null prototype],

      _eventsCount: 2,

      _maxListeners: undefined,

      _connections: 4,

      _handle: [TCP],

      _usingWorkers: false,

      _workers: [],

      _unref: false,

      allowHalfOpen: true,

      pauseOnConnect: false,

      httpAllowHalfOpen: false,

      timeout: 120000,

      keepAliveTimeout: 5000,

      maxHeadersCount: null,

      headersTimeout: 40000,

      _connectionKey: '4:0.0.0.0:20230',

      [Symbol(IncomingMessage)]: [Function: IncomingMessage],

      [Symbol(ServerResponse)]: [Function: ServerResponse],

      [Symbol(asyncId)]: 13

    },

    _server: Server {

      _events: [Object: null prototype],

      _eventsCount: 2,

      _maxListeners: undefined,

      _connections: 4,

      _handle: [TCP],

      _usingWorkers: false,

      _workers: [],

      _unref: false,

      allowHalfOpen: true,

      pauseOnConnect: false,

      httpAllowHalfOpen: false,

      timeout: 120000,

      keepAliveTimeout: 5000,

      maxHeadersCount: null,

      headersTimeout: 40000,

      _connectionKey: '4:0.0.0.0:20230',

      [Symbol(IncomingMessage)]: [Function: IncomingMessage],

      [Symbol(ServerResponse)]: [Function: ServerResponse],

      [Symbol(asyncId)]: 13

    },

    timeout: 120000,

    parser: HTTPParser {

      '0': [Function: parserOnHeaders],

      '1': [Function: parserOnHeadersComplete],

      '2': [Function: parserOnBody],

      '3': [Function: parserOnMessageComplete],

      '4': [Function: bound onParserExecute],

      _headers: [],

      _url: '',

      socket: [Circular],

      incoming: [Circular],

      outgoing: null,

      maxHeaderPairs: 2000,

      _consumed: true,

      onIncoming: [Function: bound parserOnIncoming],

      parsingHeadersStart: 1600144170273

    },

    on: [Function: socketListenerWrap],

    addListener: [Function: socketListenerWrap],

    prependListener: [Function: socketListenerWrap],

    _paused: false,

    _httpMessage: ServerResponse {

      _events: [Object: null prototype],

      _eventsCount: 1,

      _maxListeners: undefined,

      outputData: [],

      outputSize: 0,

      writable: true,

      _last: false,

      chunkedEncoding: false,

      shouldKeepAlive: true,

      useChunkedEncodingByDefault: true,

      sendDate: true,

      _removedConnection: false,

      _removedContLen: false,

      _removedTE: false,

      _contentLength: null,

      _hasBody: true,

      _trailer: '',

      finished: false,

      _headerSent: false,

      socket: [Circular],

      connection: [Circular],

      _header: null,

      _onPendingData: [Function: bound updateOutgoingData],

      _sent100: false,

      _expect_continue: false,

      req: [Circular],

      locals: [Object: null prototype] {},

      writeHead: [Function: writeHead],

      end: [Function: end],

      [Symbol(kNeedDrain)]: false,

      [Symbol(isCorked)]: false,

      [Symbol(kOutHeaders)]: [Object: null prototype]

    },

    _peername: { address: '127.0.0.1', family: 'IPv4', port: 51058 },

    [Symbol(asyncId)]: 1341,

    [Symbol(kHandle)]: TCP {

      reading: true,

      onconnection: null,

      _consumed: true,

      [Symbol(owner)]: [Circular]

    },

    [Symbol(lastWriteQueueSize)]: 0,

    [Symbol(timeout)]: Timeout {

      _idleTimeout: 120000,

      _idlePrev: [TimersList],

      _idleNext: [Timeout],

      _idleStart: 32355,

      _onTimeout: [Function: bound ],

      _timerArgs: undefined,

      _repeat: null,

      _destroyed: false,

      [Symbol(refed)]: false,

      [Symbol(asyncId)]: 1376,

      [Symbol(triggerId)]: 1343

    },

    [Symbol(kBuffer)]: null,

    [Symbol(kBufferCb)]: null,

    [Symbol(kBufferGen)]: null,

    [Symbol(kBytesRead)]: 0,

    [Symbol(kBytesWritten)]: 0

  },

  _consuming: true,

  _dumped: false,

  next: [Function: next],

  baseUrl: '',

  originalUrl: '/login',

  _parsedUrl: Url {

    protocol: null,

    slashes: null,

    auth: null,

    host: null,

    port: null,

    hostname: null,

    hash: null,

    search: null,

    query: null,

    pathname: '/login',

    path: '/login',

    href: '/login',

    _raw: '/login'

  },

  params: {},

  query: {},

  res: ServerResponse {

    _events: [Object: null prototype] { finish: [Function: bound resOnFinish] },

    _eventsCount: 1,

    _maxListeners: undefined,

    outputData: [],

    outputSize: 0,

    writable: true,

    _last: false,

    chunkedEncoding: false,

    shouldKeepAlive: true,

    useChunkedEncodingByDefault: true,

    sendDate: true,

    _removedConnection: false,

    _removedContLen: false,

    _removedTE: false,

    _contentLength: null,

    _hasBody: true,

    _trailer: '',

    finished: false,

    _headerSent: false,

    socket: Socket {

      connecting: false,

      _hadError: false,

      _parent: null,

      _host: null,

      _readableState: [ReadableState],

      readable: true,

      _events: [Object: null prototype],

      _eventsCount: 8,

      _maxListeners: undefined,

      _writableState: [WritableState],

      writable: true,

      allowHalfOpen: true,

      _sockname: null,

      _pendingData: null,

      _pendingEncoding: '',

      server: [Server],

      _server: [Server],

      timeout: 120000,

      parser: [HTTPParser],

      on: [Function: socketListenerWrap],

      addListener: [Function: socketListenerWrap],

      prependListener: [Function: socketListenerWrap],

      _paused: false,

      _httpMessage: [Circular],

      _peername: [Object],

      [Symbol(asyncId)]: 1341,

      [Symbol(kHandle)]: [TCP],

      [Symbol(lastWriteQueueSize)]: 0,

      [Symbol(timeout)]: Timeout {

        _idleTimeout: 120000,

        _idlePrev: [TimersList],

        _idleNext: [Timeout],

        _idleStart: 32355,

        _onTimeout: [Function: bound ],

        _timerArgs: undefined,

        _repeat: null,

        _destroyed: false,

        [Symbol(refed)]: false,

        [Symbol(asyncId)]: 1376,

        [Symbol(triggerId)]: 1343

      },

      [Symbol(kBuffer)]: null,

      [Symbol(kBufferCb)]: null,

      [Symbol(kBufferGen)]: null,

      [Symbol(kBytesRead)]: 0,

      [Symbol(kBytesWritten)]: 0

    },

    connection: Socket {

      connecting: false,

      _hadError: false,

      _parent: null,

      _host: null,

      _readableState: [ReadableState],

      readable: true,

      _events: [Object: null prototype],

      _eventsCount: 8,

      _maxListeners: undefined,

      _writableState: [WritableState],

      writable: true,

      allowHalfOpen: true,

      _sockname: null,

      _pendingData: null,

      _pendingEncoding: '',

      server: [Server],

      _server: [Server],

      timeout: 120000,

      parser: [HTTPParser],

      on: [Function: socketListenerWrap],

      addListener: [Function: socketListenerWrap],

      prependListener: [Function: socketListenerWrap],

      _paused: false,

      _httpMessage: [Circular],

      _peername: [Object],

      [Symbol(asyncId)]: 1341,

      [Symbol(kHandle)]: [TCP],

      [Symbol(lastWriteQueueSize)]: 0,

      [Symbol(timeout)]: Timeout {

        _idleTimeout: 120000,

        _idlePrev: [TimersList],

        _idleNext: [Timeout],

        _idleStart: 32355,

        _onTimeout: [Function: bound ],

        _timerArgs: undefined,

        _repeat: null,

        _destroyed: false,

        [Symbol(refed)]: false,

        [Symbol(asyncId)]: 1376,

        [Symbol(triggerId)]: 1343

      },

      [Symbol(kBuffer)]: null,

      [Symbol(kBufferCb)]: null,

      [Symbol(kBufferGen)]: null,

      [Symbol(kBytesRead)]: 0,

      [Symbol(kBytesWritten)]: 0

    },

    _header: null,

    _onPendingData: [Function: bound updateOutgoingData],

    _sent100: false,

    _expect_continue: false,

    req: [Circular],

    locals: [Object: null prototype] {},

    writeHead: [Function: writeHead],

    end: [Function: end],

    [Symbol(kNeedDrain)]: false,

    [Symbol(isCorked)]: false,

    [Symbol(kOutHeaders)]: [Object: null prototype] {

      'x-powered-by': [Array],

      'surrogate-control': [Array],

      'cache-control': [Array],

      pragma: [Array],

      expires: [Array],

      'access-control-allow-origin': [Array],

      vary: [Array],

      'access-control-allow-credentials': [Array]

    }

  },

  body: { username: '215', password: '' },

  _body: true,

  length: undefined,

  _parsedOriginalUrl: Url {

    protocol: null,

    slashes: null,

    auth: null,

    host: null,

    port: null,

    hostname: null,

    hash: null,

    search: null,

    query: null,

    pathname: '/login',

    path: '/login',

    href: '/login',

    _raw: '/login'

  },

  sessionStore: MemoryStore {

    _events: [Object: null prototype] {

      disconnect: [Function: ondisconnect],

      connect: [Function: onconnect]

    },

    _eventsCount: 2,

    _maxListeners: undefined,

    sessions: [Object: null prototype] {

      'yJ-BidUl1xgSHDmvlZCnGrGpOXdPEuGG': '{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/","s

ameSite":"lax"}}',

      '6D00jCBjQVjI9oxdDVaixKe_59saqDp1': '{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/","s

ameSite":"lax"}}',

      QM96Ej7oEfXGsCOP8ZrYpwq5jByHCHzy: '{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/","sam

eSite":"lax"}}'

    },

    generate: [Function]

  },

  sessionID: '6D00jCBjQVjI9oxdDVaixKe_59saqDp1',

  session: Session {

    cookie: {

      path: '/',

      _expires: null,

      originalMaxAge: null,

      httpOnly: true,

      sameSite: 'lax'

    }

  },

  route: Route { path: '/login', stack: [ [Layer] ], methods: { post: true } }

}


End

2020年9月14日 星期一

Ionic with Vue 3 and TypeScript

 https://ionicframework.com/blog/announcing-the-new-ionic-vue-beta/


npm install -g @ionic/cli@testing

ionic start my-app tabs --type vue --tag vue-beta

ionic serve


package.json

  "dependencies": {

    "@ionic/vue": "0.3.1",

    "@ionic/vue-router": "0.3.1",

    "core-js": "^3.6.5",

    "vue": "^3.0.0-rc.10",

    "vue-router": "^4.0.0-beta.9"

  },


On 2020/9/14

Only version 0.3.1 and newer of the Ionic Vue beta are compatible with Vue 3. To continue using the Ionic Vue beta with Vue 2, version 0.0.9 should be used.


End

VueJS with ionic @vue/cli @ionic/vue@next

 

clone from C:\d\lab\flaskw3html\19.vuejs\07.ionic\app\notes.md

created on 2020/7/27

repeated on 2020/9/14


"dependencies": {

    "@ionic/vue": "0.0.9",

    "ionicons": "^4.6.3",

    "vue": "^2.6.11",

    "vue-router": "^3.2.0"

  }


2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...