var sequelize = new Sequelize('postgress://user:pass@example.com:5432/dbname');
```
The Sequelize constructor takes a whole slew of options that are available via the [API reference](http://sequelize.readthedocs.org/en/latest/api/sequelize/).
## Your first model
Models are defined with `sequelize.define('name', {attributes}, {options})`.
```js
varUser=sequelize.define('user',{
firstName:{
type:Sequelize.STRING,
field:'first_name'// Will result in an attribute that is firstName when user facing but first_name in the database
},
lastName:{
type:Sequelize.STRING
}
},{
freezeTableName:true// Model tableName will be the same as the model name
});
User.sync({force:true}).then(function(){
// Table created
returnUser.create({
firstName:'John',
lastName:'Hancock'
});
});
```
Many more options can be found in the [Model API reference](http://sequelize.readthedocs.org/en/latest/api/model/)
### Application wide model options
The Sequelize constructor takes a `define` option which will be used as the default options for all defined models.
```js
varsequelize=newSequelize('connectionUri',{
timestamps:false// true by default
});
varUser=sequelize.define('user',{});// timestamps is false by default
The Sequelize constructor takes a whole slew of options that are available via the [API reference](http://sequelize.readthedocs.org/en/latest/api/sequelize/).