This file contains hidden or 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
| variables: | |
| node_version: 16.19.1 | |
| pool: | |
| vmImage: 'ubuntu-latest' | |
| steps: | |
| - task: NodeTool@0 | |
| inputs: | |
| versionSpec: $(node_version) |
This file contains hidden or 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
| FROM node:12-alpine | |
| ENV MYAPP_DB_URL=CHANGE_ME | |
| EXPOSE 3000 | |
| WORKDIR /app | |
| COPY package*.json ./ | |
| RUN npm install --production | |
| COPY index.js ./ | |
| CMD ["node", "index.js"] | |
This file contains hidden or 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
| stream deploy uppercase --properties "deployer.http.kubernetes.createNodePort=true,app.http.spring.cloud.stream.bindings.output.binder=binder-one,app.transform.spring.cloud.stream.bindings.input.binder=binder-one,app.transform.spring.cloud.stream.bindings.output.binder=binder-two,app.log.spring.cloud.stream.bindings.input.binder=binder-two" |
This file contains hidden or 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
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: scdf-server | |
| labels: | |
| app: scdf-server | |
| data: | |
| application.yaml: |- | |
| spring: | |
| cloud: |
This file contains hidden or 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
| stream deploy uppercase --properties "deployer.http.kubernetes.createNodePort=true" |
This file contains hidden or 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
| stream create --name 'uppercase' --definition 'http | transform --expression=payload.toUpperCase() | log' |
This file contains hidden or 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
| { | |
| "disabled": false, | |
| "bindings": [{ | |
| "type": "httpTrigger", | |
| "name": "req", | |
| "direction": "in", | |
| "dataType": "binary", | |
| "methods": [ | |
| "post" | |
| ] |
This file contains hidden or 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
| const Emittery = require('emittery'); | |
| const myEmitter = new Emittery(); | |
| let value = 1; | |
| myEmitter.on('event', () => { | |
| value = 2 | |
| }); | |
| myEmitter.on('event', () => { | |
| value += 2 | |
| }); | |
| myEmitter.emit('event'); |
This file contains hidden or 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
| const EventEmitter = require('events'); | |
| const myEmitter = new EventEmitter(); | |
| let value = 1; | |
| myEmitter.on('event', () => { | |
| setImmediate(() => { | |
| value = 2 | |
| }); | |
| }); | |
| myEmitter.on('event', () => { |
This file contains hidden or 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
| let value = 1; | |
| setImmediate(() => { | |
| value = 2; | |
| }) | |
| console.log(value); // This will print 1. |
NewerOlder