Showing
23 changed files
with
85 additions
and
33 deletions
This diff is collapsed. Click to expand it.
client/.gitignore
0 → 100644
1 | +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
2 | + | ||
3 | +# dependencies | ||
4 | +/node_modules | ||
5 | +/.pnp | ||
6 | +.pnp.js | ||
7 | + | ||
8 | +# testing | ||
9 | +/coverage | ||
10 | + | ||
11 | +# production | ||
12 | +/build | ||
13 | + | ||
14 | +# misc | ||
15 | +.DS_Store | ||
16 | +.env.local | ||
17 | +.env.development.local | ||
18 | +.env.test.local | ||
19 | +.env.production.local | ||
20 | + | ||
21 | +npm-debug.log* | ||
22 | +yarn-debug.log* | ||
23 | +yarn-error.log* |
File moved
client/package-lock.json
0 → 100644
This diff could not be displayed because it is too large.
client/package.json
0 → 100644
1 | +{ | ||
2 | + "name": "project", | ||
3 | + "version": "0.1.0", | ||
4 | + "private": true, | ||
5 | + "dependencies": { | ||
6 | + "@material-ui/core": "^4.11.2", | ||
7 | + "@testing-library/jest-dom": "^5.11.6", | ||
8 | + "@testing-library/react": "^11.2.2", | ||
9 | + "@testing-library/user-event": "^12.5.0", | ||
10 | + "react": "^17.0.1", | ||
11 | + "react-dom": "^17.0.1", | ||
12 | + "react-scripts": "4.0.1", | ||
13 | + "web-vitals": "^0.2.4" | ||
14 | + }, | ||
15 | + "scripts": { | ||
16 | + "start": "react-scripts start", | ||
17 | + "build": "react-scripts build", | ||
18 | + "test": "react-scripts test", | ||
19 | + "eject": "react-scripts eject" | ||
20 | + }, | ||
21 | + "eslintConfig": { | ||
22 | + "extends": [ | ||
23 | + "react-app", | ||
24 | + "react-app/jest" | ||
25 | + ] | ||
26 | + }, | ||
27 | + "browserslist": { | ||
28 | + "production": [ | ||
29 | + ">0.2%", | ||
30 | + "not dead", | ||
31 | + "not op_mini all" | ||
32 | + ], | ||
33 | + "development": [ | ||
34 | + "last 1 chrome version", | ||
35 | + "last 1 firefox version", | ||
36 | + "last 1 safari version" | ||
37 | + ] | ||
38 | + } | ||
39 | +} |
No preview for this file type
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
This diff could not be displayed because it is too large.
1 | { | 1 | { |
2 | - "name": "project", | 2 | + "name": "Student", |
3 | - "version": "0.1.0", | 3 | + "version": "1.0.0", |
4 | - "private": true, | ||
5 | - "dependencies": { | ||
6 | - "@material-ui/core": "^4.11.2", | ||
7 | - "@testing-library/jest-dom": "^5.11.6", | ||
8 | - "@testing-library/react": "^11.2.2", | ||
9 | - "@testing-library/user-event": "^12.5.0", | ||
10 | - "react": "^17.0.1", | ||
11 | - "react-dom": "^17.0.1", | ||
12 | - "react-scripts": "4.0.1", | ||
13 | - "web-vitals": "^0.2.4" | ||
14 | - }, | ||
15 | "scripts": { | 4 | "scripts": { |
16 | - "start": "react-scripts start", | 5 | + "client": "cd client && npm start", |
17 | - "build": "react-scripts build", | 6 | + "server": "nodemon server.js", |
18 | - "test": "react-scripts test", | 7 | + "dev": "concurrently --kill-others-on-fail \"yarn server\" \"yarn client\"" |
19 | - "eject": "react-scripts eject" | ||
20 | }, | 8 | }, |
21 | - "eslintConfig": { | 9 | + "dependencies": { |
22 | - "extends": [ | 10 | + "body-parser": "^1.19.0", |
23 | - "react-app", | 11 | + "express": "4.17.1" |
24 | - "react-app/jest" | ||
25 | - ] | ||
26 | }, | 12 | }, |
27 | - "browserslist": { | 13 | + "devDependencies": { |
28 | - "production": [ | 14 | + "concurrently": "^5.3.0" |
29 | - ">0.2%", | ||
30 | - "not dead", | ||
31 | - "not op_mini all" | ||
32 | - ], | ||
33 | - "development": [ | ||
34 | - "last 1 chrome version", | ||
35 | - "last 1 firefox version", | ||
36 | - "last 1 safari version" | ||
37 | - ] | ||
38 | } | 15 | } |
39 | } | 16 | } | ... | ... |
server.js
0 → 100644
1 | +const express=require('express'); | ||
2 | +const bodyparser = require("body-parser"); | ||
3 | +const app = express(); | ||
4 | +const port = process.env.process || 5000; | ||
5 | + | ||
6 | +app.use(bodyparser.json()); | ||
7 | +app.use(bodyparser.urlencoded({ extended: true})); | ||
8 | + | ||
9 | +app.get('/api/hello', (req, res)=>{ | ||
10 | + res.send({message: 'Hello Express!'}); | ||
11 | +}); | ||
12 | + | ||
13 | +app.listen(port, () => console.log(`Listening on port ${port}`)); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment