stackoverflow clone
1.0.0
โครงการนี้เป็นโคลนสแต็กเต็มรูปแบบที่เรียบง่ายของ Stackoverflow ฉันเขียนมันเพื่อเรียนรู้เพิ่มเติมเกี่ยวกับ nodejs, React/Next, Pixel Perfect Design และฐานข้อมูล NOSQL โดยทั่วไป อย่าลังเลที่จะมีส่วนร่วม!
# Clone this repository
$ git clone https://github.com/salihozdemir/stackoverflow-clone
# Go into the repository
$ cd stackoverflow-clone
# Go into server
$ cd server
# Start mongodb locally
$ mongod
# Install dependencies
$ npm install
# Start the backend server
$ npm run dev
# On another terminal, go to the client folder
$ cd ../client
# Install dependencies
$ npm install
# Use the command below for Android devices
$ npm run dev
# To see the incomplete storybook components
npm run storybookตรวจสอบให้แน่ใจว่า MongoDB กำลังทำงานก่อนทดสอบเซิร์ฟเวอร์
$ cd server
$ yarn testมีการทดสอบที่ขาดหายไปทางฝั่งเซิร์ฟเวอร์และยังไม่มีการทดสอบในฝั่งไคลเอ็นต์
คุณจะต้องตั้งค่าบัญชีและฐานข้อมูล MongoDB ATLAS และฐานข้อมูล
ตรวจสอบให้แน่ใจว่าคลัสเตอร์มีการเชื่อมต่อที่ได้รับการพิจารณาจากทุกที่
สร้างแอพใหม่ของ Heroku
ไปที่การตั้งค่าแอพ
เพิ่มสภาพแวดล้อมต่อไปนี้
เพิ่ม nodejs ใน buildpacks
# Go into the repository
$ cd stackoverflow-clone
# Heroku Setup
$ npm install -g heroku
$ heroku login
$ heroku git:remote -a your-app-name
# push subdirectory repository with subtree
$ git subtree push --prefix server heroku master
เลือกไดเรกทอรีไคลเอนต์
เพิ่ม url heroku api ใน site_name enviorement
ในที่สุดก็ปรับใช้แอปพลิเคชันไคลเอนต์
โครงการนี้จัดทำขึ้นภายใต้ใบอนุญาต MIT