프로젝트
GitHub에서 보기
makinhs/rest-api-tutorial
소개
Toptal에 게시된 다음 글의 예제 소스 코드입니다: https://www.toptal.com/nodejs/secure-rest-api-in-nodejs
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalREST API Tutorial
This sample is published as part of the corresponding article at the Toptal Engineering Blog. Visit https://www.toptal.com/developers/blog and subscribe to our newsletter to read great posts!
Before using
- Please make sure that you have:
- Node.js installed (https://nodejs.org/)
- MongoDB installed and running locally (https://www.mongodb.com/)
- Using Windows, just open the terminal at where you installed mongo and run
mongod.exe
- Using Windows, just open the terminal at where you installed mongo and run
- Run
npm installoryarnin your root project folder
Usage
To run the project, please use a command line the following:
npm start- It will run the server at port 3600.
2019-09-13 update
- Refactored mongoose to a proper common service.
- Added a Dockerfile and docker-compose configuration.
If you are familiar to docker and you have docker installed on your machine and just want to run the project without issues please do:
- docker-compose build
- docker-compose up
- It will run the mongodb at port 27017 (for testing purposes only).
- It will run the server at port 3600.
2020-02-01
I've created a 2020 version of this project using Typescript. If you might be interested on it, please check the following repository: https://github.com/makinhs/expressjs-api-tutorial
2020-09-09
- Updated and pruned dependencies.
- Fixed deprecation warnings.
- Leveraged
findOneAndUpdateto simplify PATCH code. - Changed default MongoDB server name to
localhostto simplify first-time setup. - Checked that it works with the latest version of Node.js, 14.9.0.
2020-11-14
- Accepted changes in the docker file that was causing MongoDB issues on Windows Subsystem Linux (WSL2) - Ubuntu.
- If you are new to this project, I highly recommend starting with Typescript first, like we talk about here: https://www.toptal.com/express-js/nodejs-typescript-rest-api-pt-1
관련 프로젝트 살펴보기
불러오는 중…