0.1.3 • Published 1 year ago

arvis-backend-boilerplate v0.1.3

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
1 year ago

Arvis Backend Boilerplate

Boilerplate source code refers to a pre-written code that can be reused as a starting point for a new project. It is often used as a template for common functionality, such as setting up a basic web server or connecting to a database. The term "boilerplate" refers to the idea that the code is reusable and can be easily adapted for different projects, similar to the way a boilerplate is used as a reusable mold for creating cast iron products.

Get Started

How to use boilerplate ?

To get started boilerplate, run the following command :

  npx arvis-backend-boilerplate

after run command you will get the following questions

  • Arvis project name :, Enter the name of the project that will be created
  • Are you using SQL : , Yes if you used Psql/Mysql and No for MongoDB
  • DB Host (host for sql , mongo uri for nosql) :, Enter db host
  • *DB Port :, Enter DB Port
  • *DB User :, Enter DB User
  • *DB Password :, Enter DB Password
  • *DB Name :, Enter DB Name
  • port :, Enter the port of the project , exp 3000
? Arvis project name : arvis-app
? Are you using SQL : Yes
? DB Host (host for sql , mongo uri for nosql) : localhost
? DB Port : 5432
? DB User : postgres
? DB Password : arvis123
? DB Name : arvisBoilerPlate
? port : 3000
Downloading files from repo git@gitlab.arvis-engineering.net:bayu.elroy/arvis-boilerplate.git
Cloning into 'arvis-app'...
Cloned successfully.

Installing dependencies...

added 490 packages, and audited 491 packages in 12s

68 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Dependencies installed successfully.

Create ENV File...
{
  app: 'arvis-app',
  databases: true,
  sql_host: 'localhost',
  sql_port: '5432',
  sql_user: 'postgres',
  sql_password: 'arvis123',
  sql_db: 'arvisBoilerPlate',
  port: '3000'
}
File is created successfully.

Notes :

* its mean optional which only appears when you select sql

Running Tests

To run tests, run the following command

  npm run test

Deployment

Before deploy project remove "type": "module", in file package.json

And deploy this project run

  npm run dev

For Check health route : http://localhost:${port}/api/health-check

Documentation

the link to view the documentation is : http://localhost:${port}/api/web/docs/