This is an online markdown application. You can sign in by Google account and start to use it!
- OAuth2.0 Google 3rd party login with JWT
- Add middleware for authentication and authorization
- Add soft delete and updatedAt timestamps in articles db
- CRUD Markdown articles
- Add security headers by helmet & add CORS rules
- nodejs
- express
- eslint
- helmet
- MongoDB + mongoose
- passport + passport w. google oauth2
- jwt
- cors
- cookie-parser
- vue + vue-router for SPA
- pinia
- vueuse
- vue3-markdown
- eslint + prettier
- nanoid
- vite
- docker
- dotenv
- nodemon
- Github action
- OAuth2 w. google
- connect w. mongoDB using mongoose
- use helmet middleware for security
- CRUD documents
- add Dockerfile
- use cors middleware
- use https/ssl
- Github Action flow
- Allow frame-ancestors in readonly page
- Connect client with server by cors
- Add CRUD requests for posts
- Add markdown parser
- Clone this project
- Install dependency packages
$ npm run install-all
- Copy and fullfill .env
$ cp .env.example .env # CLIENT_ID & CLIENT_SECRET is used for Google Auth
- create key.pem
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365 -subj '/CN=non /O=My Company Name LTD./C=US'
- run this project
npm run prod
$ docker build -t luluo/ez-markdown:latest .
$ docker run -e CLIENT_ID=<CLIENT_ID> -e CLIENT_SECRET=<CLIENT_SECRET> -e JWT_SECRET_KEY=<JWT_SECRET_KEY> -e MONGO_DB=<MONGO_DB> -p 8000:8000 <your-name>/<project-name>:latest
- use double quote to quote your variable, like
CLIENT_ID="this-is-my-id"
.