Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/calebmer/railway-test


https://github.com/calebmer/railway-test

Last synced: 17 days ago
JSON representation

Awesome Lists containing this project

README

        

# Node.js + TypeScript Starter

![](../../actions/workflows/ci.yml/badge.svg)

[![](https://railway.app/button.svg)](https://railway.app/template/8AWlL5?referralCode=bonus)

## Key Features

- [ TypeScript](https://www.typescriptlang.org/)
- [Environment variables typing](dev.ts)
- [TypeScript & JavaScript compatibility](https://www.typescriptlang.org/tsconfig#allowJs)
- [ES Modules & CommonJS compatibility](https://esbuild.github.io/api/#format-commonjs)
- [ Node.js](https://nodejs.org/)
- [Live Reload](https://nodejs.org/en/blog/release/v18.11.0)
- [Debugging](https://nodejs.org/en/docs/guides/debugging-getting-started)
- [ esbuild](https://esbuild.github.io/)
- [Fast bundling](https://esbuild.github.io/faq/#benchmark-details)
- [Fast transpiling](https://esbuild.github.io/faq/#benchmark-details)
- [ Rome](https://rome.tools/)
- [Fast linting](https://github.com/rome/tools/blob/main/benchmark/README.md#linting)
- [Fast formatting](https://github.com/rome/tools/blob/main/benchmark/README.md#formatting)
- [Import sorting](https://rome.tools/blog/2022/12/06/rome11/#import-sorting-experimental)
- [ GitHub](https://github.com)
- [One click template](https://github.com/dayblox/node-ts/generate)
- [Continuous integration with dependency caching](.github/workflows/ci.yml)

## Prerequisites

- [ pnpm](https://pnpm.io/installation) `>=7.27.0`
- [Running multiple scripts in parallel](https://pnpm.io/cli/run#running-multiple-scripts)
- [Automatic Node.js version management](https://pnpm.io/npmrc#use-node-version)

## Getting Started

1. **[Deploy on Railway](https://railway.app/template/8AWlL5?referralCode=bonus)** or **[use this template](https://github.com/dayblox/node-ts/generate)**

2. **Clone** the repository

3. **Install** dependencies

```sh
pnpm i
```

4. Create environment file **`env.ts`** at the root

```ts
export default {
PORT: 80,
} as const;
```

## Usage

- **Development** mode (**debug**)

```sh
pnpm dev
```

- **Production** build

```sh
pnpm build && pnpm start
```