-
Couldn't load subscription status.
- Fork 16
relocate frontend files and setup backend environment #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e1235d3
relocate frontend and setup backend environment
minhngo3818 7b248c4
reorganize directories
minhngo3818 2b66bc7
Merge branch 'main' of https://github.com/Computer-Science-Club-OCC/C…
minhngo3818 39390b2
update, add gitignore, modify workflow
minhngo3818 677be79
minor updates
minhngo3818 3c4e74f
setup axios & eslint-prettier for backend
minhngo3818 f9dac7b
setup jest for testing
minhngo3818 8d1b3f6
setup git pages
minhngo3818 93c0f65
completed backend setup & add axios for api
minhngo3818 15a5a8b
setup testing environment
minhngo3818 4223df9
Merge 'main' into setup-backend-env client
minhngo3818 70be5e0
fix bug
minhngo3818 583eea6
re-allocate diretories
minhngo3818 61784a9
config jest, add dummy test & naming convention
minhngo3818 77724ad
change it into test for readability
minhngo3818 1a3581b
add tags model
minhngo3818 016e321
update .env file
minhngo3818 8ac0107
fix typo
minhngo3818 beddac4
remove unnecessary code
minhngo3818 3b7cad7
replace handleError with console.log()
minhngo3818 ba3b027
add imageSchema to eventSchema
minhngo3818 2d332ac
refactor description into detail
minhngo3818 82e51fb
remove unused code in activity
minhngo3818 20fb051
add external gitignore
minhngo3818 74eec15
add new line in external gitignore
minhngo3818 0c05056
remove body parser due to express v4
minhngo3818 01b6456
use built-in express parser
minhngo3818 a756024
add controllers, framework, tags-route
minhngo3818 0d8929b
Fixed broken workflow bc/ of refactor
KHVBui 80c3b7c
add rules, remove unused plugins, add format:diff
minhngo3818 214b3db
comment unused imports & format
minhngo3818 d6831da
Merge pull request #70 from Computer-Science-Club-OCC/bug-fix-workflo…
minhngo3818 e4b5f4f
add import plugin
minhngo3818 41828a3
Merge branch 'setup-backend-env' of https://github.com/Computer-Scien…
minhngo3818 7b6bf77
add plugin n
minhngo3818 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # NOTES: This file will not be included in actual deployment !! | ||
| PORT=8000 | ||
| DATABASE_URI=mongodb://localhost:27017/cs_club |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "env": { | ||
| "browser": true, | ||
| "commonjs": true, | ||
| "es2021": true, | ||
| "node": true, | ||
| "jest/globals": true | ||
| }, | ||
| "extends": [ | ||
| "standard", | ||
| "eslint:recommended", | ||
| "plugin:promise/recommended", | ||
| "plugin:jest/recommended", | ||
| "plugin:prettier/recommended" | ||
| ], | ||
| "plugins": ["jest", "prettier"], | ||
| "parserOptions": { | ||
| "ecmaVersion": "latest", | ||
| "sourceType": "module" | ||
| }, | ||
| "rules": { | ||
| "prettier/prettier": "error", | ||
| "no-unused-expressions": "error", | ||
| "no-unused-vars": "warn", | ||
| "no-empty-function": "error", | ||
| "no-underscore-dangle": "off", | ||
| "promise/always-return": "error", | ||
| "promise/no-return-wrap": "error", | ||
| "promise/param-names": "error", | ||
| "promise/catch-or-return": "error", | ||
| "promise/no-native": "off", | ||
| "promise/no-nesting": "warn", | ||
| "promise/no-promise-in-callback": "warn", | ||
| "promise/no-callback-in-promise": "warn", | ||
| "promise/avoid-new": "warn", | ||
| "promise/no-new-statics": "error", | ||
| "promise/no-return-in-finally": "warn", | ||
| "promise/valid-params": "warn", | ||
| "jest/no-disabled-tests": "warn", | ||
| "jest/no-focused-tests": "error", | ||
| "jest/no-identical-title": "error", | ||
| "jest/prefer-to-have-length": "warn", | ||
| "jest/valid-expect": "error" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # dependencies | ||
minhngo3818 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /node_modules | ||
| /.pnp | ||
| .pnp.js | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
| # production | ||
| /build | ||
| /static | ||
|
|
||
| # misc | ||
| .env | ||
| .DS_Store | ||
| .env.local | ||
| .env.development.local | ||
| .env.test.local | ||
| .env.production.local | ||
|
|
||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "trailingComma": "es5", | ||
| "tabWidth": 4, | ||
| "semi": false, | ||
| "singleQuote": false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // const events = require("../../models/events/events-model") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // const organizations = require("../../models/organizations/orgs-model") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // const projects = require("../../models/projects/projects-model") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // const readings = require("../../models/readings/readings-model") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // const tags = require("../../models/tags/tags-model") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // const tutorials = require("../../models/tutorials/tutorials-model") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // const user = require("../../models/user/user-model") |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| const express = require("express") | ||
| const app = express() | ||
| const mongoose = require("mongoose") | ||
| // const multer = require("multer") | ||
| const PORT = process.env.PORT || 8000 | ||
| require("dotenv/config") | ||
|
|
||
| // Connect datbase and create collection | ||
| mongoose | ||
| .connect( | ||
| process.env.DATABASE_URI, | ||
| { useNewUrlParser: true }, | ||
| { useUnifiedTopology: true }, | ||
| () => console.log("Connected to datbase!") | ||
| ) | ||
| .catch((error) => { | ||
| console.log(error) | ||
| }) | ||
|
|
||
| // Parsing | ||
| app.use(express.urlencoded({ extended: true })) | ||
| app.use(express.json()) | ||
|
|
||
| // Import Routes | ||
| // const eventsRoute = require("./routes/events/events-route") | ||
| // const projectsRoute = require("./routes/projects/projects-route") | ||
| // const tutorialsRoute = require("./routes/tutorials/tutorials-route") | ||
| // const readingsRoute = require("./routes/readings/readings-route") | ||
| // const organizationsRoute = require("./routes/organizations/orgs-route") | ||
|
|
||
| // Use Routes | ||
|
|
||
| // Run server | ||
| app.listen(PORT, () => { | ||
| console.log(`Running backend server on: http://localhost:${PORT}`) | ||
| }) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.