Skip to content

Commit

Permalink
Merge pull request #1213 from microsoft/dev
Browse files Browse the repository at this point in the history
Sync from dev
  • Loading branch information
sibille committed Oct 25, 2019
2 parents 23a444f + 9fe5dca commit a5f26c5
Show file tree
Hide file tree
Showing 33 changed files with 80 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/client/src/containers/AppServiceModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const backendFrameworkNameToAppServiceRuntimeStack: Map<
[WIZARD_CONTENT_INTERNAL_NAMES.NODE, WIZARD_CONTENT_INTERNAL_NAMES.NODE],
[
WIZARD_CONTENT_INTERNAL_NAMES.MOLECULER,
WIZARD_CONTENT_INTERNAL_NAMES.MOLECULER
WIZARD_CONTENT_INTERNAL_NAMES.NODE
],
[WIZARD_CONTENT_INTERNAL_NAMES.FLASK, WIZARD_CONTENT_INTERNAL_NAMES.PYTHON]
]);
Expand Down
2 changes: 1 addition & 1 deletion src/client/src/mockData/mockVsCodeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const mockVsCodeApi = () => ({
platforms: ["Web"],
languages: ["Any"],
tags: {
version: "0.13.10",
version: "0.13.11",
preview: false
}
},
Expand Down
5 changes: 4 additions & 1 deletion src/extension/src/azure/utils/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ export namespace Settings {
fsPath,
CONSTANTS.APP_SERVICE_DEPLOYMENT.DOT_VSCODE_FOLDER
);
await fse.mkdir(dotVSCodeFolder);
let vsCodeFolderExists = await fse.pathExists(dotVSCodeFolder);
if (!vsCodeFolderExists) {
await fse.mkdir(dotVSCodeFolder);
}
const settingPath = path.join(
dotVSCodeFolder,
CONSTANTS.APP_SERVICE_DEPLOYMENT.SETTINGS_FILE_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"manualInstructions": [],
"actionId": "CB387AC0-16D0-4E07-B41A-F1EA616A7CA9",
"args": {
"dict": "{'moleculer': '^0.13.10', 'moleculer-web': '0.9.0-beta6'}",
"dict": "{'moleculer': '^0.13.11', 'moleculer-web': '0.9.0-beta6'}",
"key": "dependencies",
"jsonPath": "package.json"
},
Expand Down
9 changes: 5 additions & 4 deletions templates/Web/Projects/MoleculerDefault/README_postaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ The front-end is served on http://localhost:3000/ and the back-end on http://loc
```
.
//{[{
├── services/ - Moleculer services that provides API routes and serves front-end with data
│ └── api.service.js - HTTP gateway service
│ ├── pages.service.js - Service that serves the data
│ ├── pages.actions.js - Contains the actual handlers for the API calls
├── server/ Directory with everything backend-related
│ ├── moleculer.config.js - Moleculer Service Broker configuration file. More info: https://moleculer.services/docs/0.13/broker.html
│ ├── services/ - Moleculer services that provides API routes and serves front-end with data
│ │ ├── api.service.js - HTTP gateway service
│ │ └── pages.service.js - Service that serves the data and contains the actual handlers for the API calls
//}]}
└── README.md
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
// Namespace of nodes to segment your nodes on the same network.
namespace: "",
// Unique node identifier. Must be unique in a namespace.
nodeID: null,
nodeID: "webTS",

// Enable/disable logging or use custom logger. More info: https://moleculer.services/docs/0.13/logging.html
logger: true,
Expand All @@ -30,6 +30,10 @@ module.exports = {
// Custom object & array printer for built-in console logger.
logObjectPrinter: null,

// Define transporter.
// More info: https://moleculer.services/docs/0.14/networking.html
transporter: null,

// Define a serializer.
// Available values: "JSON", "Avro", "ProtoBuf", "MsgPack", "Notepack", "Thrift".
// More info: https://moleculer.services/docs/0.13/networking.html
Expand Down
12 changes: 12 additions & 0 deletions templates/Web/Projects/MoleculerDefault/server/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "WebTemplateStudioMoleculer",
"version": "0.0.0",
"private": true,
"dependencies": {
"moleculer": "^0.13.11",
"moleculer-web": "0.9.0-beta6"
},
"engines": {
"node": ">=10.14.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

const ApiGateway = require("moleculer-web");
const path = require("path");

module.exports = {
name: "api",
Expand Down Expand Up @@ -29,9 +30,9 @@ module.exports = {
}
],

// Serve assets from "server/build" folder
// Serve assets from "build" folder
assets: {
folder: "server/build"
folder: path.resolve(__dirname, "..", "build")
}
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

### Sample Data

Replace the sample data stored in /server/sampleData.js.
Replace the default images stored in /src/images.
Replace the sample data stored in `server/data/sampleData.js`.
//}]}

### Deployment

.
├── services/ - Moleculer services that provides API routes and serves front-end with data
│ └── api.service.js - HTTP gateway service
│ ├── pages.service.js - Service that serves the data
│ ├── pages.actions.js - Contains the actual handlers for the API calls
├── server/ Directory with everything backend-related
│ ├── moleculer.config.js - Moleculer Service Broker configuration file. More info: https://moleculer.services/docs/0.13/broker.html
│ ├── services/ - Moleculer services that provides API routes and serves front-end with data
│ │ ├── api.service.js - HTTP gateway service
│ │ └── pages.service.js - Service that serves the data and contains the actual handlers for the API calls
//{[{
│ ├── sampleData.js - Contains all sample text data required to generate pages
│ ├── data/ - Folder containing data samples
│ └── sampleData.js - Contains all sample text data required to generate pages
//}]}
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

### Sample Data

Replace the sample data stored in /server/sampleData.js.
Replace the default images stored in /src/images.
Replace the sample data stored in `server/data/sampleData.js`.
//}]}

### Deployment

.
├── services/ - Moleculer services that provides API routes and serves front-end with data
│ └── api.service.js - HTTP gateway service
│ ├── pages.service.js - Service that serves the data
│ ├── pages.actions.js - Contains the actual handlers for the API calls
├── server/ Directory with everything backend-related
│ ├── moleculer.config.js - Moleculer Service Broker configuration file. More info: https://moleculer.services/docs/0.13/broker.html
│ ├── services/ - Moleculer services that provides API routes and serves front-end with data
│ │ ├── api.service.js - HTTP gateway service
│ │ └── pages.service.js - Service that serves the data and contains the actual handlers for the API calls
//{[{
│ ├── sampleData.js - Contains all sample text data required to generate pages
│ ├── data/ - Folder containing data samples
│ └── sampleData.js - Contains all sample text data required to generate pages
//}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"moleculer": "^0.13.11",
//{[{
"dotenv": "^8.1.0",
"moleculer-db": "^0.8.2",
"moleculer-db-adapter-mongo": "^0.4.5",
//}]}
"moleculer-web": "0.9.0-beta6"
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = opt => {
* This will extend `pages` service with DB handlers
*/
mixins: [DBService],
// Setup DB Adapter. More info: https://moleculer.services/docs/0.13/moleculer-db.html
// Setup DB Adapter. More info: https://github.com/AndreMaz/moleculer-db-adapter-cosmos
adapter: new CosmosAdapter(
{
endpoint: process.env.COSMOSDB_URI,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"moleculer": "^0.13.11",
//{[{
"dotenv": "^8.1.0",
"moleculer-db": "^0.8.2",
"moleculer-db-adapter-cosmos": "^0.0.2",
//}]}
"moleculer-web": "0.9.0-beta6"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"start": "concurrently \"yarn start-frontend || npm run start-frontend\" \"yarn start-backend || npm run start-backend\"",
//{[{
"start-backend": "moleculer-runner --repl --hot services",
"start-backend": "moleculer-runner --repl --hot --config server/moleculer.config.js server/services",
//}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"private": true,
//{[{
"scripts": {
"start": "moleculer-runner services"
},
//}]}
"dependencies": {
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"start": "concurrently \"yarn start-frontend || npm run start-frontend\" \"yarn start-backend || npm run start-backend\"",
//{[{
"start-backend": "moleculer-runner --repl --hot --env services",
"start-backend": "moleculer-runner --repl --hot --env --config server/moleculer.config.js server/services",
//}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"private": true,
//{[{
"scripts": {
"start": "moleculer-runner --envfile ../.env services"
},
//}]}
"dependencies": {
2 changes: 1 addition & 1 deletion templates/_catalog/backendframeworks.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"platforms": ["Web"],
"languages": ["Any"],
"tags": {
"version": "0.13.10",
"version": "0.13.11",
"preview": false
}
}
Expand Down

0 comments on commit a5f26c5

Please sign in to comment.