# j-fnd

> - Install package ``npm i j-fnd`` - Create jFnd.js file inside the root of the project --You can add custom actions and specify configurations inside this file. ``` const deployCfg = { //REQUIRED deployUser: "", //REQUIRED

Latest version **2.0.4** (published 2022-09-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install j-fnd
pnpm add j-fnd
yarn add j-fnd
bun add j-fnd
```

Provides the commands `j-fnd`, `j-fnd--custom`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2022-09-06 |
| First published | 2022-03-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jo-tech |

## Links

- npm: https://www.npmjs.com/package/j-fnd
- Repository: https://github.com/Johannes-Pics-Dev/J-FND
- Homepage: https://github.com/Johannes-Pics-Dev/J-FND#readme
- Issues: https://github.com/Johannes-Pics-Dev/J-FND/issues
- npm.io page: https://npm.io/package/j-fnd

## Dependencies (3)

- [shipit-cli](https://npm.io/package/shipit-cli.md) ^5.3.0
- [shipit-deploy](https://npm.io/package/shipit-deploy.md) ^5.3.0
- [shipit-shared](https://npm.io/package/shipit-shared.md) ^4.4.2

## Recent versions

- 2.0.4 (latest) — 2022-09-06
- 2.0.3 — 2022-05-25
- 2.0.2 — 2022-05-25
- 2.0.1 — 2022-04-22
- 2.0.0 — 2022-04-22
- 1.0.0 — 2022-03-22

## README

# Nodejs ssh deploy

- Install package
  ``npm i j-fnd``
- Create jFnd.js file inside the root of the project
--You can add custom actions and specify configurations inside this file.
  ```
    const deployCfg = {
      //REQUIRED
      deployUser: "",
      //REQUIRED
      appName: "",
      //REQUIRED
      serverIp: "",
      //REQUIRED
      repoUrl: "",
      //REQUIRED
      deployFolder: "",
      //REQUIRED options -> production, staging
      env: "production",
      //REQUIRED if env is production
      productionBranch: "",
      //REQUIRED if env is staging
      stagingBranch: "",
      //REQUIRED
      appStartupFile: "",
      //OPTIONAL
      linkedFolders: [],
      //OPTIONAL
      linkedFiles: ["config/environment.yaml"],
      //REQUIRED
      hostName: "foobar.com",
      //REQUIRED
      port: 3001,
      //REQUIRED
      location: ""
    }
    
    exports.deployCfg = deployCfg;
    
    exports.startup = async (shipit) => {
      await shipit.remote(
        `cd ${shipit.currentPath} && DB_ENV=deploy pm2 start --name ${deployCfg.appName} ${deployCfg.appStartupFile} --env production`
      );
    };
    
    exports.beforeNodeModulesInstall = async (shipit) => {
      await Promise.resolve();
    };
    
    exports.afterNodeModulesInstall = async (shipit) => {
      await shipit.remote(`cd ${shipit.currentPath} && npm run build`);
      await shipit.remote(`cd ${shipit.currentPath} && DB_ENV=deploy npm run db:migrate`);
    };

---
_Source: https://npm.io/package/j-fnd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
