---
title: Définir les vues
slug: oip-project-starter-v2/definir-les-vues
description: Learn how to create a YAML file in the viewConfig folder with this informative document. Explore step-by-step instructions on building views, configuring app settings, defining environments, making changes in application and routes files, and even discove
icon: 👁️
createdAt: 2023-05-26T13:06:33.000Z
---

Créer votre fichier \<*vue*>.yaml dans le dossier viewConfig

```yaml
start:
  viewId: START
  pathname: /start
  directory: start
  actions:
    - PREVIOUS
  graphql:
    queries:
      - type: Project
        fields:
          id: ID
          propositionNumber: String
        resolver: getStartProject
    mutations:
      - type: SaveProject
        inputs:
          effectDate: String
        resolver: saveStartProject
```

# Build views

```shell
yarn build:views
```

# APP Base Configuration

Définir l'environnemment : `.env`

```properties
OIP_MONGO_DB_URL=mongodb://localhost:27017/fasst-oip-core
```

Dans l'application : `app.mjs`

```javascript
import OIP from '@fasstech/oip-core';
import { viewIds, actionIds } from '../views/ids.mjs';
 
(async () => {
  await OIP.start();
})()

```

Dans les routes : `routes.mjs`

```javascript
import oipRoutes from '@fasstech/oip-core/routes';
const router = express.Router();

// Added this
router.use(oipRoutes);
```

# VSCode

```shell
yarn vscode:build:jsconfig
```

