Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Template
Browse files Browse the repository at this point in the history
  • Loading branch information
bookercodes committed Mar 26, 2018
0 parents commit aa141c2
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# dependencies
node_modules/

# errors
npm-debug.log*
yarn-debug.log*
yarn-error.log*
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "react-chat-tutorial",
"version": "0.1.0",
"private": true,
"dependencies": {
"cors": "^2.8.4",
"express": "^4.16.3",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-scripts": "1.1.1"
},
"devDependencies": {
"concurrently": "^3.5.1"
},
"scripts": {
"start": "concurrently \"node ./server.js\" \"react-scripts start\"",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
11 changes: 11 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>React App</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
18 changes: 18 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')

const app = express()

app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
app.use(cors())

const PORT = 3001
app.listen(PORT, err => {
if (err) {
console.error(err)
} else {
console.log(`Running on port ${PORT}`)
}
})
9 changes: 9 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React, { Component } from 'react'

class App extends Component {
render() {
return <h1>Chatly</h1>
}
}

export default App
Empty file added src/components/.placeholder
Empty file.
9 changes: 9 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
* {
margin: 0;
padding: 0;
}

body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin: 0;
}
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import './index.css'

ReactDOM.render(<App />, document.getElementById('root'))

0 comments on commit aa141c2

Please sign in to comment.