프로젝트
GitHub에서 보기
bradtraversy/storybooks
소개
Google OAuth를 사용하는 Node.js 앱
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalStoryBooks
Create public and private stories from your life
This app uses Node.js/Express/MongoDB with Google OAuth for authentication
Setup
- Install dependencies:
npm install
- Create your environment file:
- During install,
postinstallattempts to create.envautomatically from.env.example. - If
.envwas not created, copy.env.exampleto.envmanually.
- Add values to
.env:
PORT=3000
MONGO_URI=mongodb+srv://<username>:<password>@<cluster-url>/<database>?retryWrites=true&w=majority
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
MongoDB URI
Use your MongoDB Atlas connection string for MONGO_URI.
Example:
MONGO_URI=mongodb+srv://appuser:[email protected]/storybooks?retryWrites=true&w=majority
Google OAuth Setup
- In Google Cloud Console, create or select a project.
- Configure the OAuth consent screen.
- Create OAuth 2.0 Client ID credentials (Web application).
- Add an Authorized redirect URI:
http://localhost:3000/auth/google/callback
- Copy the generated Client ID and Client Secret into
.envasGOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET.
Run
# Run in development
npm run dev
# Run in production
npm start
관련 프로젝트 살펴보기
불러오는 중…