# Endpoint

Generates a new API endpoint.

Usage:

```bash
Usage:
  yo angular-fullstack:endpoint [options] <name>

Options:
  -h,   --help               # Print the generator's options and usage
        --skip-cache         # Do not remember prompt answers             Default: false
        --route              # URL for the endpoint
        --models             # Specify which model(s) to use            Options: mongoose, sequelize
        --endpointDirectory  # Parent directory for enpoints

Arguments:
  name    Type: String  Required: true
```

Example:

```bash
yo angular-fullstack:endpoint message
[?] What will the url of your endpoint be? /api/messages
```

Produces:

```
server/api/message/index.js
server/api/message/index.spec.js
server/api/message/message.controller.js
server/api/message/message.integration.js
server/api/message/message.model.js  (optional)
server/api/message/message.events.js (optional)
server/api/message/message.socket.js (optional)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://awk34.gitbook.io/generator-angular-fullstack/generators/endpoint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
