TypeScript + Express + Mongo + AdminJS backend boilerplate
- Install Node JS, NPM, Yarn
- Install MongoDB and run it. I am using free MongoDB Community Server.
- Clone this repo, delete
.git
folder and install dependencies:
git clone [email protected]:etomarat/tema-boilerplate.git && cd tema-boilerplate
rm -rf .git
yarn
- Copy example settings
cp .env.example .env
- Edit
.env
file with your data. For example:
COMPANY_NAME="Example company" # for AdminJS title
DB_NAME="default" # mongodb databese
PORT=8000 # nodejs port
SECRET='unsafe password' # WARNING! Must be random string for security reasone
SESSION_SECRET='unsafe password' # WARNING! Must be random string for security reasone
ADMIN_SECRET='unsafe password' # WARNING! Must be random string for security reasone
- Start dev server
yarn dev
- Build JS (for deploy)
yarn build
- Start production server (need to build before)
yarn build
yarn addAdmin your_login your_password