Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Updateing dependencies, adding some styles and build for production #18

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
5 changes: 2 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"presets": ["es2015", "react"],
"plugins": ["transform-object-rest-spread"]
}
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
4 changes: 2 additions & 2 deletions .eslintrc
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true
},
},
}
}
}
Empty file modified .gitignore
100644 → 100755
Empty file.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Idiomatic Redux TODO List

This is an example of redux in react apps. This code was forked from a [Dan Abramov repo](https://github.com/gaearon/todos).

This app use a fake backend in order to ilustrate the flow of how to manage async actions with redux.

## [Demo](https://todo-list-redux.netlify.com)

## Run local

Follow the next steps to run this project locally:
1. **Clone the repo**

Run the following on terminal:

```git clone https://github.com/CalaoJuanPablo/todos.git```

```cd todos```

2. **Install dependencies**

Install all the dependencies for the project (NOTE: You must have node and npm and/or yarn installed):

```npm install```

```yarn install```

3. **Run the development server**

You can run a developer server in `localhost:3000`

```npm start```

## Run a production build

If you want to run a production build then follow next steps:

1. **Perform a build for production**

```npm run build```

This will build all the app in a folder called `dist` where you can find all the code minified.

2. **Serve the production build**

`npm run serve`

This will serve the production build in `localhost:5000`
10 changes: 5 additions & 5 deletions devServer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';
import webpack from 'webpack';
import webpackDevMiddleware from 'webpack-dev-middleware';
import config from './webpack.config.babel';
import config from './webpack.config.dev';
import Express from 'express';

const app = new Express();
Expand All @@ -13,19 +13,19 @@ app.use(webpackDevMiddleware(compiler, {
publicPath: config.output.publicPath,
}));

app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'index.html'));
app.get('/*', (req, res) => {
res.sendFile(path.join(__dirname, 'src/index.html'));
});

app.listen(port, error => {
app.listen(port, (error) => {
/* eslint-disable no-console */
if (error) {
console.error(error);
} else {
console.info(
'🌎 Listening on port %s. Open up http://localhost:%s/ in your browser.',
port,
port
port,
);
}
/* eslint-enable no-console */
Expand Down
11 changes: 0 additions & 11 deletions index.html

This file was deleted.

Loading