Skip to content

Commit

Permalink
Ditch Netlify, add Express, refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dusan Stevanovic committed Jan 6, 2023
1 parent df009ab commit 74ab645
Show file tree
Hide file tree
Showing 25 changed files with 2,191 additions and 832 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Local Netlify folder
.netlify
node_modules
elm-stuff
.cache
Expand Down
21 changes: 21 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require('dotenv').config();
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
const { routes } = require('./server');

const PORT = process.env.PORT || 8080;

const app = express();

app.use(express.json());

routes.forEach((route) => {
route = route.module;

app[route.method](route.path, route.handler);
});

app.listen(PORT, () => {
console.log(`Server is listening on port ${PORT}`);
});
110 changes: 0 additions & 110 deletions functions/login-api.js

This file was deleted.

186 changes: 0 additions & 186 deletions functions/profile-put-api.js

This file was deleted.

Loading

0 comments on commit 74ab645

Please sign in to comment.