X Panel Blog Server is an Admin Dashboard Service that can help you develop personal blog. Made by Express.
Demo • Installation • Contribution • License
You may need to use Node.js v16.9.0 or above to continue with installation guide.
# clone the repository
$ git clone https://github.com/xevorte/blog-server.git
# navigate to the folder
$ cd blog-server
After clone the repository and navigate to the folder, you can use few commands below
# install dependencies using the node package manager of your choice. For example run
$ npm install
# or
$ yarn install
# open Mongodb Compass then connect to `localhost:27017`
# then create new database, example:
$ database name : `blog-server`
$ collection name : `users`
# after that continue create all collections with names:
$ authors, categories, comments, posts, tags
# finally after creating all 6 collections, you can `ADD DATA` from each collection using file from folder `database`
$ authors.json, categories.json, comments.json, posts.json, tags.json, users.json
# then create your own `.env` file using format from file `env` , example:
$ MODE=dev
$ PORT=4000
$ SERVICE_NAME=x-panel-blog-server
$ MONGO_URL=mongodb://127.0.0.1:27017/blog-server
$ JWT=keyforjwt
Setup your own Firebase
# open console.firebase.google.com
# sign in or sign up using your gmail account
# click `Add a project` for create a new project
# enter project name, eg. `x-panel`
# prefer to disable google analytics and just hit Continue button
# in overview you can add Firebase to web app by click `</>` icon circle button
# then register app name, prefer to disable `Also set up Firebase Hosting for this app.`
# in `Add Firebase SDK` , copy this and continue to console
`const firebaseConfig = {
...
};`
# open app.js and uncomment the commented code
# replace `firebaseConfig` you just copy to line 22
# back to Project Overview in Firebase
# click `Build` dropdown in sidebar and choose `Storage`
# click `Get Started` and start in production mode, next and done
# go to `Rules` tab, change line 5 to:
$ allow read; allow write: if request.auth != null;
# then go to `Project Setting` by clicking on wheel button or option button in sidebar beside `Project Overview`
# go to tab `Service Accounts` then download private key by click `Generate new private key`
$ put file inside config folder
# go back to app.js
# at line 12, change require config path to your private key path
# now we're done! just finish and test by running in terminal
$ `npm run dev` or `yarn dev`
You can change role on users
collection into admin
inside MongoDB Compass for explore the app
MIT License.