-
Docker Compose is only for creating
root
account in dbadmin
, this is not the database for application -
Create Application specific accounts and set the authentication details
2.1 Login to MongoDB using root credentials and use below syntax to create application specific account and the database
2.2 Application should use its own DB and Credentials
This file contains 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
package org.springframework.cloud.waves.server.stream; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.HashMap; | |
import java.util.HashSet; |
This file contains 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
#!/bin/sh | |
# ensure correct number of arguments are passed | |
if [ "$#" -ne 3 ]; then | |
echo "Usage: $0 <SOURCE Repo URL> <DIR to clone to> <TARGET Repo URL>" >&2 | |
echo "example: /.migrate_git_repo.sh [email protected]:sampleuser/source_repo.git some_folder_name ssh://[email protected]:otheruser/destination_repo.git" | |
return | |
fi | |
srcRepo=$1 |
This file contains 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 http = require('http'); | |
const url = require('url'); | |
// const querystring = require('querystring'); | |
let server = http.createServer(function(req, res) { | |
let isMatched = false; | |
console.log("Got a new Request ", req.method, " => ", req.url); | |
// Query string parameter | |
let urlParts = url.parse(req.url, true); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script id="jsbin-javascript"> |
This file contains 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 express = require('express'); | |
const morgan = require('morgan'); | |
const bodyParser = require('body-parser'); | |
const graphqlHTTP = require('express-graphql'); | |
const graphqlSchema = require('./graphqlSchema'); | |
const { | |
graphql, | |
GraphQLSchema, | |
GraphQLObjectType, |
This file contains 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 express = require('express'); | |
const swaggerUI = require('swagger-ui-express'); | |
const YAML = require('yamljs'); | |
const swaggerDocument = YAML.load('./api/swagger/swagger.yaml'); | |
let app = express(); | |
// Mount the SwaggerUI Middleware, at your preferred mount path | |
let swaggerOptions = { explorer: false }; | |
app.use('/api/v1/docs', | |
swaggerUI.serve, | |
swaggerUI.setup(swaggerDocument, swaggerOptions) |
This file contains 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 swaggerDocument = require('yamljs').load('./api/swagger/swagger.yaml'); | |
fs.writeFileSync('./api/swagger/swagger.json', JSON.stringify(swaggerDocument, null, ' ')); |
This file contains 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 swaggerDocument = require('yamljs').load('./api/swagger/swagger.yaml'); | |
fs.writeFileSync('./api/swagger/swagger.json', JSON.stringify(swaggerDocument, null, ' ')); |
This file contains 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
swagger: "2.0" | |
info: | |
version: "1.0.0" | |
title: SwaggerNodeJSDemo | |
# during dev, should point to your local machine | |
host: localhost:3000 | |
# basePath prefixes all resource paths | |
basePath: /api/v1 | |
schemes: | |
# tip: remove http to make production-grade |
NewerOlder