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
{ | |
"config": [ | |
{ | |
"name": "Name", | |
"type": "lable" | |
}, | |
{ | |
"name": "Color", | |
"type": "color-palette" | |
}, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<component name="config" type="synapse/template"> | |
<subComponents> | |
<component name="init"> | |
<file>init.xml</file> | |
<description>Configure connector</description> | |
</component> | |
</subComponents> | |
</component> |
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
SERVER_USRL = <your_sonarqube_server_url> | |
USERNAME = <your_sonarqube_account's_username> | |
PASSWORD = <your_sonarqube_account's_password> |
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
import React, { Component } from "react"; | |
import requireAuth from "./requireAuth"; | |
class Page1 extends Component { | |
render() { | |
return <div className="page1">I'm page one. Only for authorized users</div>; | |
} | |
} | |
export default requireAuth(Page1); |
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
import React, { Component } from "react"; | |
import { connect } from "react-redux"; | |
export default ChildComponent => { | |
class ComposedComponent extends Component { | |
componentDidMount() { | |
this.redirectToHome(); | |
} | |
componentDidUpdate() { |
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
import React, { Component } from "react"; | |
import { connect } from "react-redux"; | |
class Page1 extends Component { | |
componentDidMount() { | |
this.redirectToHome(); | |
} | |
componentDidUpdate() { | |
this.redirectToHome(); |
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
"proxy":{ | |
"/auth/google":{ | |
"target":"http://localhost:5000" | |
} | |
} |
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 proxy = require("http-proxy-middleware"); | |
module.exports = function(app) { | |
app.use(proxy(["/auth/google"], { target: "http://localhost:5000" })); | |
}; |
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 passport = require("passport"); | |
const GoogleStrategy = require("passport-google-oauth20").Strategy; | |
const mongoose = require("mongoose"); | |
const keys = require("../config/keys"); | |
// Get the user model | |
const User = mongoose.model("users"); | |
passport.serializeUser((user, done) => { | |
done(null, user.id); |
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 passport = require("passport"); | |
module.exports = app => { | |
app.get( | |
"/auth/google", | |
passport.authenticate("google", { | |
scope: ["profile", "email"] | |
}) | |
); | |
app.get("/auth/google/callback", passport.authenticate("google")); |
NewerOlder