Skip to content

Commit

Permalink
Initial scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmi Linkola committed Nov 20, 2019
0 parents commit c51b3f1
Show file tree
Hide file tree
Showing 8 changed files with 4,244 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"node": true,
"es6": true,
"jest": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {}
}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/dist
/node_modules
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Partio-ohjelmasovellus frontend
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "pos-backend",
"version": "0.1.0",
"description": "Partio-ohjelmasovelluksen backend",
"main": "index.js",
"scripts": {
"start": "node dist/index.js",
"dev": "nodemon --exec babel-node src/index.js",
"build": "rimraf dist && babel src --out-dir dist"
},
"dependencies": {
"cors": "2.8.5",
"express": "4.17.1",
"rimraf": "3.0.0"
},
"devDependencies": {
"@babel/cli": "7.7.0",
"@babel/core": "7.7.2",
"@babel/node": "7.7.0",
"@babel/preset-env": "7.7.1",
"eslint": "6.6.0",
"husky": "3.1.0",
"nodemon": "1.19.4",
"prettier": "1.19.1",
"pretty-quick": "2.0.1"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}
11 changes: 11 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import express from 'express'
import cors from 'cors'

const app = express()

app.use(cors())

app.get('/', (req, res) => res.send('Hello World!'))

// eslint-disable-next-line
app.listen(process.env.PORT || 3001, () => console.log('Server listening!'))
Loading

0 comments on commit c51b3f1

Please sign in to comment.