# Assets

## What are Assets?

Assets are application resources that support the functionality of the application, but do not have a standardized role in the application. For example, the public and private key need to support SSL would be considered an asset.

{% hint style="info" %}
All assets are located in `app/assets`.
{% endhint %}

## Using Assets

Depending on your needs, there are a couple of ways to load an asset. The first is to load the asset asynchronously via the `asset()` method.

```javascript
const blueprint = require ('@onehilltech/blueprint');

function doSomething () {
  return blueprint.app.asset ('publicKey').then (publicKey => {
    // do something with the loaded asset
  });
}
```

The second approach is to load the asset synchronously.

```javascript
const blueprint = require ('@onehilltech/blueprint');

function doSomething () {
  const publicKey = blueprint.app.assetSync ('publicKey');
  
  // do something with the loaded asset
}
```

{% hint style="info" %}
Loading an asset synchronously is ideal when you must use the asset in a Blueprint configuration file.
{% endhint %}
