Skip to content

Instantly share code, notes, and snippets.

View vsavkin's full-sized avatar

Victor Savkin vsavkin

View GitHub Profile
import * as express from 'express';
import { Ticket } from '@happyorg/data';
const app = express();
const tickets: Ticket[] = [
{
title: `Install updates`,
id: 1
},
import React, { useState, useEffect } from 'react';
import { Ticket } from '@happyorg/data';
export const App = () => {
const [tickets, setTickets] = useState<Ticket[]>([]);
useEffect(() => {
fetch('/api/tickets')
.then(t => t.json())
.then(setTickets);
export type Ticket = {
title: string;
id: number;
};
type Ticket = {
title: string;
id: number;
};
export const App = () => {
const [tickets, setTickets] = useState<Ticket[]>([]);
useEffect(() => {
fetch('/api/tickets')
import * as express from 'express';
import { Ticket } from '@happyorg/data';
const app = express();
type Ticket = {
title: string;
id: number;
};
import React from 'react';
import styled from 'styled-components';
const StyledApp = styled.div`
...
`;
type Ticket = {
title: string;
import { Ticket } form '@myorg/data-models';
<workspace name>
├── apps
│ ├── tickets
│ ├── tickets-e2e
│ ├── agent
│ └── agent-e2e
├── libs
│ └── data-models
│ ├── src
│ │ └─ index.ts
nx serve agent
nx test agent
nx lint agent
nx build agent
nx e2e agent-e2e
<workspace name>
├── apps
│ ├── tickets
│ ├── tickets-e2e
│ ├── agent
│ └── agent-e2e
├── libs
├── workspace.json
├── nx.json
├── package.json