Skip to content

Commit 65ab9ea

Browse files
authored
Merge branch 'master' into master
2 parents 8a49b52 + bcf9313 commit 65ab9ea

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

Diff for: .github/workflows/aws.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy to Beanstalk
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
12+
- name: Checkout source code
13+
uses: actions/checkout@v2
14+
15+
- name: Generate deployment package
16+
run: zip -r deploy.zip . -x '*.git*'
17+
18+
- name: Deploy to EB
19+
uses: einaregilsson/beanstalk-deploy@v20
20+
with:
21+
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
22+
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23+
application_name: backend-server
24+
environment_name: Backendserver-env
25+
version_label: ${{github.SHA}}
26+
region: us-east-1
27+
deployment_package: deploy.zip

Diff for: .gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
node_modules
2-
Dockerfile
32
OpenAPI.json
43
.env
54
database.db

Diff for: Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
FROM node:12
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm install
6+
COPY . .
7+
ENV PORT=8080
8+
EXPOSE 8080
9+
CMD [ "npm", "start" ]

Diff for: src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ const { removeUnconfirmedAccounts, emailConfirmationRemainder } = require('./job
1010
// Configure Local Variables
1111
const app = express();
1212
const port = process.env.PORT || 8080;
13+
const models = require('./models');
1314

1415
// Configure Middleware
1516
app.use(express.static('public'));
1617
app.use(express.urlencoded({ extended: true }));
1718
app.use(express.json());
1819
app.use(require("cors")({
19-
origin: ['https://fairfieldprogramming.org', 'http://localhost:8000/']
20+
origin: "*"
2021
}));
2122

2223
// Programs

0 commit comments

Comments
 (0)