👉 Step-1: Crawl data race result from formula1.com :
1/ Go to folder Crawl-Data and open terminal
2/ Then, run "node crawl.js" at terminal
3/ Finally, run "node write-all-data.js" at terminal
## After running all, you have two file data:/Crawl-Data/data-result-of-race/all-data-race.json
/Crawl-Data/data-result-of-driver/all-data-driver.json
- For window:
1/ Download MongoDB Command Line Database Tools Download at https://www.mongodb.com/try/download/database-tools. Then setup the environment in "Edit the system environment variables"
2/ Open cmd and run: mongoimport --jsonArray --uri mongodb+srv://[USERNAME]:[PASSWORD]@cluster0.otcckm4.mongodb.net/[DATABASE-NAME] --collection [COLLECTION-NAME] --type [FILETYPE] --file [PATH-YOUR-FILE-DATA-JSON]
1/ Go to folder Server and open terminal
2/ Run "npm install"
3/ Run "npm run start:dev"
1/ Go to folder client and open terminal
2/ Run "npm install"
3/ Run "npm start"
- Link database public, so no need to import data to mongodb
- Project use: Node version: v20.3.0 and Npm version: 9.7.1
- If npm "run install" in Server and Client Error, you can try running "npm install --force"