Back-end free with backless
npm install backless!logo
  
shell
Node Js & MongoDB
`
Help
#### To see all the command lines in our package, Use this command
`shell
$ backless --help
`
#### And you will found this text below!Help
Version
#### If you installed globally make sure you've already installed Backless Js correctly using this command
`shell
$ backless --v
`
#### Or`shell
$ backless --version
`Installation
#### Install Backless Js globally using this command
`shell
$ npm install -g backless
`
##### or
#### You could create Backless Js REST API instantly using this command`shell
$ npx backless create
`Tree
#### Here is the folder tree in a server directory that you will receive after you unpack our package
!Help
Updating
#### To make sure our INSTANT EXPRESS REST API generator work correctly please make sure to always updated it to newer version using this command
`shell
$ npm update -g backless
`Usage
#### You can run this command to start generating new server
###### Notes : Make sure there is no server folder in your working directory otherwise Backless wont create new server
`shell
$ backless create
`
$3
#### In this section please input database name to your database that you want to use and press enter. The default name is (Backless-DB)
$3
#### Please input model name to your database.The default name is (Foobar)
!modelInput
$3
#### In this part, you will found text below and you have to decide the attribute's name for your model. The default name is (name)
!AttributeInput#### After you decided the attribute's name, choose the type for the attribute. The default type is (String)
!AttributeType
#### The last step of this section, you can choose to add another attribute by type "Y" or "yes" (this is the default if you're not choose or type anything) or you can choose NO by type "n" or "no".
!addAnotherAttribute
$3
#### In this section, you will choose which port you want to use. The default port is 3000.
!portInput$3
#### The secret key default is 'Backless_Secret' if you let it empty.
!jsonwebtokenInput$3
!Loading$3
!finish
Backless Command
$3
##### To run all testing files you could use this command below.`shell
$ backless prove
`
##### You will found this text message##### All you have to do is to wait for a moment till this text message show up.
##### Note: This message will show up by assuming that you're not changes anything in our package file.
BUT
##### If you want to customize your own server and there is an error, you will found this text below.
##### So, don't forget to customize all of related file to prevent the error.
##### You also can run testing by move into your server's file and run this command in your terminal.
`shell
$ npm run test
`OR
`shell
$ npm test
`$3
##### You can running the server by using this command in your terminal
`shell
$ backless serve
`
##### You will found this text after you running the server by using command above##### You can also use this command to run the server
`shell
$ npm run dev
`Add Another Models
##### If you want to add another model for your server, you can use this command
###### Notes : Make sure you're currently on your working directory the same as Backless Server folder exist
`shell
$ backless add --name --attributes : , :
`
##### "ModelName" is a name for your model (example: UserModel), "key" is for attribute's name and "dataTypes" is for attribute's type (String, Number, Boolean, Array) to add another attributes please use ',' to seperate each attribute$3
##### Example to add one attribute.
`shell
$ backless add --name UserModel --attributes name:string
`##### You also can add multiple attributes for one model.
`shell
$ backless add --name UserModel --attributes name:string,bornDate:number,isMale:boolean
``