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许可提供。