Skip to content

Instantly share code, notes, and snippets.

View rafaelaugustos's full-sized avatar
🏠
Working from home

Rafael Augusto rafaelaugustos

🏠
Working from home
View GitHub Profile
<template>
<Page>
<ActionBar>
<StackLayout>
<Image class="logo" src="~/assets/images/logo.png" />
</StackLayout>
</ActionBar>
<ScrollView>
<StackLayout>
import axios from 'axios'
import config from './endpoint'
const HTTPClient = ms => axios.create(config[ms])
export default HTTPClient
export default {
account: {
baseURL: process.env.ACCOUNT_URL || 'http://localhost:3001'
},
cart: {
baseURL: process.env.CART_URL || 'http://localhost:3002'
}
import { ApolloServer } from 'apollo-server-express'
import { makeExecutableSchema } from 'graphql-tools'
import glue from 'schemaglue'
const { schema, resolver } = glue('src/graphql')
const schemaBuilded = makeExecutableSchema({
typeDefs: schema,
resolvers: resolver
})
import express from 'express'
import server from './app'
const app = express()
server.applyMiddleware({ app, path: '/graphql' })
app.listen({ port: 3000 }, () => console.log('Listen'))
require = require('esm')(module)
module.exports = require('./src/index.js')
import http from 'http'
import express from 'express'
import proxy from 'express-http-proxy'
const app = express()
const account = httpProxy('http://localhost:3001')
const cart = httpProxy('http://localhost:3002')
app.get('/cart', (req, res, next) => {
cart(req, res, next)
node {
def app_name = "frontend-to-jenkins"
def git_url = "git@github.com:RafaelAugustoS/frontend-to-jenkins.git"
stage('Clone Repository'){
git branch: 'master',
credentialsId: 'jenkins',
url: git_url
}
import React from 'react'
import { View, StyleSheet, Text, TouchableOpacity } from 'react-native'
import Modal from './Modal'
const App = () => {
return(
<View style={styles.container}>
<Text style={styles.title}>Animated Modal RN</Text>
<TouchableOpacity style={styles.button}>
<Text>Open Modal</Text>
import React, { useState, useEffect } from 'react'
import { View, Text, StyleSheet, TouchableOpacity, Animated, Dimensions } from 'react-native'
const { height } = Dimensions.get('window')
const Modal = ({ show, close }) => {
const [state, setState] = useState({
opacity: new Animated.Value(0),
container: new Animated.Value(height),
modal: new Animated.Value(height)