diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..48b5416 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,7 @@ +{ + "parser": "babel-eslint", + "env": { + "browser": true, + "node": true + } +} diff --git a/client/client.js b/client/client.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/client/client.js @@ -0,0 +1 @@ + diff --git a/client/index.html b/client/index.html new file mode 100644 index 0000000..7a2106d --- /dev/null +++ b/client/index.html @@ -0,0 +1,12 @@ + + + + + React Todo List + + +

This is not a React app yet!

+
+ + + diff --git a/components/App.js b/components/App.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/components/App.js @@ -0,0 +1 @@ + diff --git a/package.json b/package.json index 2bdeb7f..034be19 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "1.0.0", "description": "A simple todo list app built with React, Redux and Webpack", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "serve": "nodemon server/server.js" }, "repository": { "type": "git", @@ -11,4 +12,14 @@ }, "author": "Kurt Weiberth", "license": "ISC", + "dependencies": { + "babel-core": "^6.4.5", + "babel-loader": "^6.2.2", + "babel-preset-es2015": "^6.3.13", + "babel-preset-react": "^6.3.13", + "express": "^4.13.4", + "react": "^0.14.7", + "react-dom": "^0.14.7", + "webpack": "^1.12.13" + } } diff --git a/server/server.js b/server/server.js new file mode 100644 index 0000000..51a4946 --- /dev/null +++ b/server/server.js @@ -0,0 +1,17 @@ +var express = require('express'); +var path = require('path'); + +var app = express(); + +app.use(express.static('./dist')); + +app.use('/', function (req, res) { + res.sendFile(path.resolve('client/index.html')); +}); + +var port = 3000; + +app.listen(port, function(error) { + if (error) throw error; + console.log("Express server listening on port", port); +}); diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1 @@ +