Skip to content

Instantly share code, notes, and snippets.

💭
Working on an example of dynamically loading Svelte components at run time

Razvan Predescu rzvdaniel

💭
Working on an example of dynamically loading Svelte components at run time
Block or report user

Report or block rzvdaniel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Python launch.json VSCode
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
@rzvdaniel
rzvdaniel / api.service.js
Created Jul 6, 2019
[Medium] Moleculer Routing - Shorthand RESTful Aliases
View api.service.js
const ApiGateway = require("moleculer-web");
module.exports = {
name: "api",
mixins: [ApiGateway],
settings: {
port: process.env.PORT || 3000,
routes: [{
@rzvdaniel
rzvdaniel / articles.service.js
Created Jul 6, 2019
[Medium] Moleculer Routing - RESTful Aliases
View articles.service.js
// articles.service.js
module.exports = {
name: "articles",
actions: {
list: {
handler(ctx) {
return "GET articles list";
}
},
@rzvdaniel
rzvdaniel / api.service.js
Created Jul 6, 2019
[Medium] Moleculer Routing - RESTful Aliases
View api.service.js
const ApiGateway = require("moleculer-web");
module.exports = {
name: "api",
mixins: [ApiGateway],
settings: {
port: process.env.PORT || 3000,
routes: [{
@rzvdaniel
rzvdaniel / users.service.js
Last active Jul 6, 2019
[Medium] Moleculer Routing - Auto Aliases
View users.service.js
// users.service.js
module.exports = {
name: "users",
actions: {
list: {
// Expose as "/users/"
rest: "GET /",
handler(ctx) {
return "GET Users list";
@rzvdaniel
rzvdaniel / api.service.js
Created Jul 6, 2019
[Medium] Moleculer Routing - Auto Aliases
View api.service.js
const ApiGateway = require("moleculer-web");
module.exports = {
name: "api",
mixins: [ApiGateway],
settings: {
port: process.env.PORT || 3000,
routes: [{
@rzvdaniel
rzvdaniel / api.service.js
Last active Jul 6, 2019
[Medium] Moleculer Routing - Default Configuration
View api.service.js
const ApiGateway = require("moleculer-web");
module.exports = {
name: "api",
mixins: [ApiGateway],
settings: {
port: process.env.PORT || 3000,
routes: [{
@rzvdaniel
rzvdaniel / greeter.service.js
Last active Jul 6, 2019
[Medium] Moleculer Routing - Default Configuration
View greeter.service.js
// greeter.service.js
module.exports = {
name: "greeter",
/**
* Actions
*/
actions: {
/**
@rzvdaniel
rzvdaniel / greeter.service.js
Last active Apr 26, 2019
[Medium] Moleculer Mixins - A short introduction - greeter.service.js with Mixins
View greeter.service.js
"use strict";
const WorldService = require("./world.service");
module.exports = {
name: "greeter",
mixins: [WorldService],
/**
* Actions
@rzvdaniel
rzvdaniel / world.service.js
Last active Apr 26, 2019
[Medium] Moleculer Mixins - A short introduction - world.service.js
View world.service.js
"use strict";
module.exports = {
name: "world",
/**
* Actions
*/
actions: {
You can’t perform that action at this time.