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
選擇客戶端目錄
將heroku api url添加到site_name設想
最後部署客戶端應用程序
該項目可根據MIT許可提供。