Compare commits
10 Commits
d5aa1e9245
...
275ddc54f4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
275ddc54f4 | ||
|
|
d5388aa91d | ||
|
|
c1b3059d6e | ||
|
|
02e5d3cecd | ||
|
|
c42cc9e294 | ||
|
|
1d9dc02c68 | ||
|
|
89184e80a4 | ||
|
|
69b40febdc | ||
|
|
8fb536b95f | ||
|
|
66bca2546c |
0
.gitignore → api/.gitignore
vendored
0
.gitignore → api/.gitignore
vendored
13
api/serverless.yml
Normal file
13
api/serverless.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
service: lunchrunapi
|
||||||
|
|
||||||
|
provider:
|
||||||
|
name: aws
|
||||||
|
runtime: nodejs12.x
|
||||||
|
|
||||||
|
functions:
|
||||||
|
hello:
|
||||||
|
handler: handler.hello
|
||||||
|
events:
|
||||||
|
- http:
|
||||||
|
path: hello
|
||||||
|
method: post
|
||||||
2
frontend/.browserslistrc
Normal file
2
frontend/.browserslistrc
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
5
frontend/.editorconfig
Normal file
5
frontend/.editorconfig
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[*.{js,jsx,ts,tsx,vue}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
17
frontend/.eslintrc.js
Normal file
17
frontend/.eslintrc.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
'extends': [
|
||||||
|
'plugin:vue/essential',
|
||||||
|
'@vue/standard'
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
parser: 'babel-eslint'
|
||||||
|
}
|
||||||
|
}
|
||||||
21
frontend/.gitignore
vendored
Normal file
21
frontend/.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/dist
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
24
frontend/README.md
Normal file
24
frontend/README.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# web
|
||||||
|
|
||||||
|
## Project setup
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and hot-reloads for development
|
||||||
|
```
|
||||||
|
npm run serve
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and minifies for production
|
||||||
|
```
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lints and fixes files
|
||||||
|
```
|
||||||
|
npm run lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customize configuration
|
||||||
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||||
5
frontend/babel.config.js
Normal file
5
frontend/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/cli-plugin-babel/preset'
|
||||||
|
]
|
||||||
|
}
|
||||||
11930
frontend/package-lock.json
generated
Normal file
11930
frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
30
frontend/package.json
Normal file
30
frontend/package.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"name": "lunchrunfrontend",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"lint": "vue-cli-service lint",
|
||||||
|
"deploy": "vue-cli-service s3-deploy"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": "^3.3.2",
|
||||||
|
"vue": "^2.6.10",
|
||||||
|
"vue-router": "^3.1.3",
|
||||||
|
"vuex": "^3.0.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vue/cli-plugin-babel": "^4.0.0",
|
||||||
|
"@vue/cli-plugin-eslint": "^4.0.0",
|
||||||
|
"@vue/cli-plugin-router": "^4.0.5",
|
||||||
|
"@vue/cli-plugin-vuex": "^4.0.5",
|
||||||
|
"@vue/cli-service": "^4.0.0",
|
||||||
|
"@vue/eslint-config-standard": "^4.0.0",
|
||||||
|
"babel-eslint": "^10.0.3",
|
||||||
|
"eslint": "^5.16.0",
|
||||||
|
"eslint-plugin-vue": "^5.0.0",
|
||||||
|
"vue-cli-plugin-s3-deploy": "^3.0.0",
|
||||||
|
"vue-template-compiler": "^2.6.10"
|
||||||
|
}
|
||||||
|
}
|
||||||
5
frontend/postcss.config.js
Normal file
5
frontend/postcss.config.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: {
|
||||||
|
autoprefixer: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
frontend/public/favicon.ico
Normal file
BIN
frontend/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
17
frontend/public/index.html
Normal file
17
frontend/public/index.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
|
<title>web</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong>We're sorry but web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
9
frontend/src/App.vue
Normal file
9
frontend/src/App.vue
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<router-view/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
12
frontend/src/main.js
Normal file
12
frontend/src/main.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import App from './App.vue'
|
||||||
|
import store from './store'
|
||||||
|
import router from './router'
|
||||||
|
|
||||||
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
store,
|
||||||
|
router,
|
||||||
|
render: h => h(App)
|
||||||
|
}).$mount('#app')
|
||||||
29
frontend/src/router/index.js
Normal file
29
frontend/src/router/index.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import VueRouter from 'vue-router'
|
||||||
|
import Home from '../views/Home.vue'
|
||||||
|
|
||||||
|
Vue.use(VueRouter)
|
||||||
|
|
||||||
|
const routes = [
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
name: 'home',
|
||||||
|
component: Home
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/about',
|
||||||
|
name: 'about',
|
||||||
|
// route level code-splitting
|
||||||
|
// this generates a separate chunk (about.[hash].js) for this route
|
||||||
|
// which is lazy-loaded when the route is visited.
|
||||||
|
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const router = new VueRouter({
|
||||||
|
mode: 'history',
|
||||||
|
base: process.env.BASE_URL,
|
||||||
|
routes
|
||||||
|
})
|
||||||
|
|
||||||
|
export default router
|
||||||
15
frontend/src/store/index.js
Normal file
15
frontend/src/store/index.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import Vuex from 'vuex'
|
||||||
|
|
||||||
|
Vue.use(Vuex)
|
||||||
|
|
||||||
|
export default new Vuex.Store({
|
||||||
|
state: {
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
},
|
||||||
|
modules: {
|
||||||
|
}
|
||||||
|
})
|
||||||
5
frontend/src/views/About.vue
Normal file
5
frontend/src/views/About.vue
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<template>
|
||||||
|
<div class="about">
|
||||||
|
<h1>This is an about page</h1>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
14
frontend/src/views/Home.vue
Normal file
14
frontend/src/views/Home.vue
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<div class="home">
|
||||||
|
lunch run home
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// @ is an alias to /src
|
||||||
|
//import HelloWorld from '@/components/HelloWorld.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'home'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
22
frontend/vue.config.js
Normal file
22
frontend/vue.config.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
module.exports = {
|
||||||
|
pluginOptions: {
|
||||||
|
s3Deploy: {
|
||||||
|
registry: undefined,
|
||||||
|
awsProfile: 'default',
|
||||||
|
region: 'us-east-1',
|
||||||
|
bucket: 'lunchrunfrontend',
|
||||||
|
createBucket: true,
|
||||||
|
staticHosting: true,
|
||||||
|
staticIndexPage: 'index.html',
|
||||||
|
staticErrorPage: 'index.html',
|
||||||
|
assetPath: 'dist',
|
||||||
|
assetMatch: '**',
|
||||||
|
deployPath: '/',
|
||||||
|
acl: 'public-read',
|
||||||
|
pwa: false,
|
||||||
|
enableCloudfront: false,
|
||||||
|
uploadConcurrency: 5,
|
||||||
|
pluginVersion: '3.0.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
serverless.yml
117
serverless.yml
@@ -1,117 +0,0 @@
|
|||||||
# Welcome to Serverless!
|
|
||||||
#
|
|
||||||
# This file is the main config file for your service.
|
|
||||||
# It's very minimal at this point and uses default values.
|
|
||||||
# You can always add more config options for more control.
|
|
||||||
# We've included some commented out config examples here.
|
|
||||||
# Just uncomment any of them to get that config option.
|
|
||||||
#
|
|
||||||
# For full config options, check the docs:
|
|
||||||
# docs.serverless.com
|
|
||||||
#
|
|
||||||
# Happy Coding!
|
|
||||||
|
|
||||||
service: lunchrun
|
|
||||||
# app and org for use with dashboard.serverless.com
|
|
||||||
#app: your-app-name
|
|
||||||
#org: your-org-name
|
|
||||||
|
|
||||||
# You can pin your service to only deploy with a specific Serverless version
|
|
||||||
# Check out our docs for more details
|
|
||||||
# frameworkVersion: "=X.X.X"
|
|
||||||
|
|
||||||
provider:
|
|
||||||
name: aws
|
|
||||||
runtime: nodejs12.x
|
|
||||||
|
|
||||||
# you can overwrite defaults here
|
|
||||||
# stage: dev
|
|
||||||
# region: us-east-1
|
|
||||||
|
|
||||||
# you can add statements to the Lambda function's IAM Role here
|
|
||||||
# iamRoleStatements:
|
|
||||||
# - Effect: "Allow"
|
|
||||||
# Action:
|
|
||||||
# - "s3:ListBucket"
|
|
||||||
# Resource: { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "ServerlessDeploymentBucket" } ] ] }
|
|
||||||
# - Effect: "Allow"
|
|
||||||
# Action:
|
|
||||||
# - "s3:PutObject"
|
|
||||||
# Resource:
|
|
||||||
# Fn::Join:
|
|
||||||
# - ""
|
|
||||||
# - - "arn:aws:s3:::"
|
|
||||||
# - "Ref" : "ServerlessDeploymentBucket"
|
|
||||||
# - "/*"
|
|
||||||
|
|
||||||
# you can define service wide environment variables here
|
|
||||||
# environment:
|
|
||||||
# variable1: value1
|
|
||||||
|
|
||||||
# you can add packaging information here
|
|
||||||
#package:
|
|
||||||
# include:
|
|
||||||
# - include-me.js
|
|
||||||
# - include-me-dir/**
|
|
||||||
# exclude:
|
|
||||||
# - exclude-me.js
|
|
||||||
# - exclude-me-dir/**
|
|
||||||
|
|
||||||
functions:
|
|
||||||
hello:
|
|
||||||
handler: handler.hello
|
|
||||||
events:
|
|
||||||
- http:
|
|
||||||
path: hello
|
|
||||||
method: post
|
|
||||||
# The following are a few example events you can configure
|
|
||||||
# NOTE: Please make sure to change your handler code to work with those events
|
|
||||||
# Check the event documentation for details
|
|
||||||
# events:
|
|
||||||
# - http:
|
|
||||||
# path: users/create
|
|
||||||
# method: get
|
|
||||||
# - websocket: $connect
|
|
||||||
# - s3: ${env:BUCKET}
|
|
||||||
# - schedule: rate(10 minutes)
|
|
||||||
# - sns: greeter-topic
|
|
||||||
# - stream: arn:aws:dynamodb:region:XXXXXX:table/foo/stream/1970-01-01T00:00:00.000
|
|
||||||
# - alexaSkill: amzn1.ask.skill.xx-xx-xx-xx
|
|
||||||
# - alexaSmartHome: amzn1.ask.skill.xx-xx-xx-xx
|
|
||||||
# - iot:
|
|
||||||
# sql: "SELECT * FROM 'some_topic'"
|
|
||||||
# - cloudwatchEvent:
|
|
||||||
# event:
|
|
||||||
# source:
|
|
||||||
# - "aws.ec2"
|
|
||||||
# detail-type:
|
|
||||||
# - "EC2 Instance State-change Notification"
|
|
||||||
# detail:
|
|
||||||
# state:
|
|
||||||
# - pending
|
|
||||||
# - cloudwatchLog: '/aws/lambda/hello'
|
|
||||||
# - cognitoUserPool:
|
|
||||||
# pool: MyUserPool
|
|
||||||
# trigger: PreSignUp
|
|
||||||
# - alb:
|
|
||||||
# listenerArn: arn:aws:elasticloadbalancing:us-east-1:XXXXXX:listener/app/my-load-balancer/50dc6c495c0c9188/
|
|
||||||
# priority: 1
|
|
||||||
# conditions:
|
|
||||||
# host: example.com
|
|
||||||
# path: /hello
|
|
||||||
|
|
||||||
# Define function environment variables here
|
|
||||||
# environment:
|
|
||||||
# variable2: value2
|
|
||||||
|
|
||||||
# you can add CloudFormation resource templates here
|
|
||||||
#resources:
|
|
||||||
# Resources:
|
|
||||||
# NewResource:
|
|
||||||
# Type: AWS::S3::Bucket
|
|
||||||
# Properties:
|
|
||||||
# BucketName: my-new-bucket
|
|
||||||
# Outputs:
|
|
||||||
# NewOutput:
|
|
||||||
# Description: "Description for the output"
|
|
||||||
# Value: "Some output value"
|
|
||||||
Reference in New Issue
Block a user