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 ApiGateway = require("moleculer-web"); | |
module.exports = { | |
name: "api", | |
mixins: [ApiGateway], | |
settings: { | |
port: process.env.PORT || 3000, | |
routes: [{ |
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
// users.service.js | |
module.exports = { | |
name: "users", | |
actions: { | |
list: { | |
// Expose as "/users/" | |
rest: "GET /", | |
handler(ctx) { | |
return "GET Users list"; |
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 ApiGateway = require("moleculer-web"); | |
module.exports = { | |
name: "api", | |
mixins: [ApiGateway], | |
settings: { | |
port: process.env.PORT || 3000, | |
routes: [{ |
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 ApiGateway = require("moleculer-web"); | |
module.exports = { | |
name: "api", | |
mixins: [ApiGateway], | |
settings: { | |
port: process.env.PORT || 3000, | |
routes: [{ |
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
// greeter.service.js | |
module.exports = { | |
name: "greeter", | |
/** | |
* Actions | |
*/ | |
actions: { | |
/** |
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
"use strict"; | |
const WorldService = require("./world.service"); | |
module.exports = { | |
name: "greeter", | |
mixins: [WorldService], | |
/** | |
* Actions |
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
"use strict"; | |
module.exports = { | |
name: "world", | |
/** | |
* Actions | |
*/ | |
actions: { |
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
"use strict"; | |
module.exports = { | |
name: "greeter", | |
/** | |
* Actions | |
*/ | |
actions: { |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>braces</Title> | |
<Shortcut>braces</Shortcut> | |
<Description>Code snippet to surround a block of code with braces</Description> | |
<Author>Igor Zevaka</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
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
setTimeout(() => { | |
// Anything here will be timed out for 2 seconds | |
}, 2000) |