perishop
1.0.0
Perishop is a web app that provides you with 300+ Shops.
Perishop App은 평균 스택을 사용하여 구축되었습니다.
M: MongoDB (NoSQL / Non Relational database)
E: ExpressJs (Web application framework for building APIs)
A: Angular (Javascript MVC framework for front end web development)
N: NodeJs (Environment for running Javascript in the server side)
고객 부교수/
Contains source code of the front end side :
- Components : client-perishop/src/app/components
- Services : client-perishop/src/app/services
- Modules : client-perishop/src/app
- Package.json (dependencies)
- Angular CLI generated files
고객/
This is the folder you need to try the app, please don't delete it.
It contains the project build after running :
> ng build
노선/
두 파일을 포함합니다.
? Shops.js :
Handling Shops end points.
? user.js :
Handling Users end points.
모델/
? Shops.js :
Holds the definition of Shop Model using Mongoose Schema, for querying the database and handling all CRUD operations that concerns shops records.
? user.js :
Holds the definition of User Model using Mongoose Schema, for querying the database and handling all CRUD operations that deals with users records.
구성/
Holds an Object with database path to connect to using mongoose.
데이터 베이스/
Holds the database folder where all records go and mongoDB journaling is saved.
? app.js
Is the entry point to the app. It holds a set of imports among which : Express, Mongoose, BodyParser, Passport and other middleware.
Perishop 기능은 다음과 같습니다.
프로젝트 폴더 (예 : PerishopApp)를 만들고 CD를 작성하십시오.
~$ cd ..../perishopApp
실행하여 프로젝트 폴더에서 github 저장소를 복제하십시오.
~$ .../perishopApp // present working directory
git clone https://github.com/atidevs/perishop.git
MongoDB를 설치해야합니다 : 커뮤니티 서버
https://www.mongodb.com/download-center?jmp=nav#community
MacOS 또는 Linux에있는 경우이 단계를 건너 뛰고 Windows를 다운로드하여 GIT를 설치하는 경우 :
https://git-scm.com/downloads
MongoDB와 Git이 설치되면 Git Bash 및 CD를 다음과 같이 엽니 다.
~$ cd .../mongodb/bin (... : wherever path you installed mongodb in, usually C:/mongodb/bin)
그런 다음이 명령을 실행합니다.
~$ mongod --dbpath=".../perishopApp/perishop/database"
다른 git bash 터미널을 엽니 다 :
~$ cd .../perishopApp/perishop (... : wherever the path to your perishopApp folder is)
그런 다음이 명령을 실행합니다.
~$ start
브라우저를 열고 다음으로 이동하십시오.
localhost:3000
축하해요! 당신은 홈페이지에 있습니다
데이터베이스의 레코드를 확인하려면 다음을 수행하십시오.
MacOS 및 Linux에서 Windows의 관리자 또는 (터미널)로 명령 줄 (CMD)을 열고 실행하십시오.
> mongo
나중에 실행중인 Git Bash 터미널을 보면 :
~$ mongod --dbpath=".../perishopApp/perishop/database"
당신은 끝에 어딘가에 보일 것입니다 (이제 2 개의 연결이 열려 있습니다) : 첫 번째 연결은 앱 자체에서 나온 것입니다 (~ $ start를 실행할 때).
이제 다음이 명령을 실행할 수 있습니다.
> show dbs // to show all available databases
> use perishop // to use the perishop database displayed among available dbs
> show collections // to show all collections inside perishop db
> db.users.find().pretty() // to list all signed up users and their information
> db.shops.find().pretty() // to list all shops and their information
즐기십시오