Skip to content

Commit 35b16ae

Browse files
committed
create table frontend
0 parents  commit 35b16ae

36 files changed

+14698
-0
lines changed

.babelrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
"env",
4+
"react"
5+
],
6+
"plugins": [
7+
"transform-class-properties",
8+
"transform-object-rest-spread",
9+
"transform-decorators-legacy",
10+
"react-hot-loader/babel"
11+
]
12+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
/node_modules
3+
/.idea
4+
/yarn.lock
5+
/package-lock.json.idea

Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# To start the project run:
2+
## npm run dev
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
{
2+
"info": {
3+
"name": "TransferHeroku",
4+
"_postman_id": "1547c482-c8cf-50fb-3ead-5d26f2cbf6f7",
5+
"description": "",
6+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
7+
},
8+
"item": [
9+
{
10+
"name": "login",
11+
"request": {
12+
"method": "POST",
13+
"header": [
14+
{
15+
"key": "Content-Type",
16+
"value": "application/x-www-form-urlencoded"
17+
},
18+
{
19+
"key": "Accept",
20+
"value": "application/json"
21+
}
22+
],
23+
"body": {
24+
"mode": "urlencoded",
25+
"urlencoded": [
26+
{
27+
"key": "email",
28+
"value": "[email protected]",
29+
"description": "",
30+
"type": "text"
31+
},
32+
{
33+
"key": "password",
34+
"value": "qwerty123",
35+
"description": "",
36+
"type": "text"
37+
}
38+
]
39+
},
40+
"url": {
41+
"raw": "https://transfer-api.herokuapp.com/login",
42+
"protocol": "https",
43+
"host": [
44+
"transfer-api",
45+
"herokuapp",
46+
"com"
47+
],
48+
"path": [
49+
"login"
50+
]
51+
},
52+
"description": null
53+
},
54+
"response": []
55+
},
56+
{
57+
"name": "register",
58+
"request": {
59+
"method": "POST",
60+
"header": [
61+
{
62+
"key": "Content-Type",
63+
"value": "application/x-www-form-urlencoded"
64+
},
65+
{
66+
"key": "Accept",
67+
"value": "application/json"
68+
}
69+
],
70+
"body": {
71+
"mode": "urlencoded",
72+
"urlencoded": [
73+
{
74+
"key": "first_name",
75+
"value": "Pavel",
76+
"description": "",
77+
"type": "text"
78+
},
79+
{
80+
"key": "last_name",
81+
"value": "Kostyuk",
82+
"description": "",
83+
"type": "text"
84+
},
85+
{
86+
"key": "email",
87+
"value": "[email protected]",
88+
"description": "",
89+
"type": "text"
90+
},
91+
{
92+
"key": "phone",
93+
"value": "0683188524",
94+
"description": "",
95+
"type": "text"
96+
},
97+
{
98+
"key": "password",
99+
"value": "qwerty123",
100+
"description": "",
101+
"type": "text"
102+
}
103+
]
104+
},
105+
"url": {
106+
"raw": "https://transfer-api.herokuapp.com/register",
107+
"protocol": "https",
108+
"host": [
109+
"transfer-api",
110+
"herokuapp",
111+
"com"
112+
],
113+
"path": [
114+
"register"
115+
]
116+
},
117+
"description": null
118+
},
119+
"response": [
120+
{
121+
"id": "dfbe25da-8508-4f11-9d6d-ceb0da017814",
122+
"name": "register",
123+
"originalRequest": {
124+
"method": "POST",
125+
"header": [
126+
{
127+
"key": "Content-Type",
128+
"value": "application/x-www-form-urlencoded"
129+
},
130+
{
131+
"key": "Accept",
132+
"value": "application/json"
133+
}
134+
],
135+
"body": {
136+
"mode": "urlencoded",
137+
"urlencoded": [
138+
{
139+
"key": "first_name",
140+
"value": "Pavel",
141+
"description": "",
142+
"type": "text"
143+
},
144+
{
145+
"key": "last_name",
146+
"value": "Kostyuk",
147+
"description": "",
148+
"type": "text"
149+
},
150+
{
151+
"key": "email",
152+
"value": "[email protected]",
153+
"description": "",
154+
"type": "text"
155+
},
156+
{
157+
"key": "phone",
158+
"value": "0683188524",
159+
"description": "",
160+
"type": "text"
161+
},
162+
{
163+
"key": "password",
164+
"value": "qwerty123",
165+
"description": "",
166+
"type": "text"
167+
}
168+
]
169+
},
170+
"url": {
171+
"raw": "https://transfer-api.herokuapp.com/register",
172+
"protocol": "https",
173+
"host": [
174+
"transfer-api",
175+
"herokuapp",
176+
"com"
177+
],
178+
"path": [
179+
"register"
180+
]
181+
}
182+
},
183+
"status": "OK",
184+
"code": 200,
185+
"_postman_previewlanguage": "",
186+
"_postman_previewtype": "parsed",
187+
"header": [],
188+
"cookie": [],
189+
"responseTime": 0,
190+
"body": "{}"
191+
}
192+
]
193+
}
194+
]
195+
}

index.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const express = require('express')
2+
const app = express()
3+
const cors = require('cors')
4+
const path = require('path')
5+
const PORT = process.env.PORT || 3000
6+
7+
8+
9+
//const validate = require('express-validation')
10+
//const loginValidation = require("./src/Validation/Login")
11+
// const registerValidation=require("./src/Validation/Register")
12+
13+
//router.post('/login', validate(loginValidation), (request, response) => {
14+
//router.post('/register', validate(registerValidation), (request, response) => {
15+
16+
17+
18+
19+
app.use(express.static(path.join(__dirname, 'public')))
20+
21+
22+
app.use(cors())
23+
24+
app.get('*', (req, res) => {
25+
res.sendFile(__dirname + '/public/index.html')
26+
})
27+
28+
29+
app.listen(PORT, () => console.log(`Listening on ${ PORT }`))
30+

0 commit comments

Comments
 (0)