2.4.75 • Published 5 years ago

@meteor-it/rocket v2.4.75

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Meteor.Rocket

Powerfull fullstack web framework

Features

  1. Routing
  2. Server Side Rendering
  3. Preloading data
  4. Advanced HTTP/2 support with optimizations
  5. Zarbis integration

Usage example

server/index.ts

import Logger from '@meteor-it/logger';
import NodeReceiver from '@meteor-it/logger/receivers/node';
import XPress from '@meteor-it/xpress';
import { ServerMiddleware } from '@meteor-it/rocket';
import rocket from '../web';
import {readFile, read} from '@meteor-it/fs';

Logger.addReceiver(new NodeReceiver());
const logger = new Logger('WEB');
const xpress = new XPress(logger);

(async () => {
    logger.log('Init server');
    xpress.use(null, new ServerMiddleware(rocket, { compiledClientDir: `${__dirname}/../client`, compiledServerDir: `${__dirname}` }));
    xpress.listenHttp('0.0.0.0', 8080);
    xpress.listenHttps('0.0.0.0', 8443, {
        key: await readFile(`${__dirname}/../../key.pem`),
        cert: await readFile(`${__dirname}/../../cert.pem`)
    })
})();

client/index.ts

import { initClient } from '@meteor-it/rocket';
import rocket from '../web';

initClient(rocket);

web/index.ts

import Rocket from '@meteor-it/rocket';

const rocket = new Rocket();
rocket.router.on(null, null, async ctx => {
    // drawTarget = element which will be rendered on page finally
    ctx.state.drawTarget = h([
        'Hello, world!'
    ]);
});
2.4.75

5 years ago

2.4.74

5 years ago

2.4.73

6 years ago

2.4.72

6 years ago

2.4.71

6 years ago

2.4.70

6 years ago

2.4.68

6 years ago

2.4.67

6 years ago

2.4.66

6 years ago

2.4.64

6 years ago

2.4.63

6 years ago

2.4.61

6 years ago

2.4.60

6 years ago

2.4.59

6 years ago

2.4.58

6 years ago

2.4.57

6 years ago

2.4.55

6 years ago

2.4.54

6 years ago

2.4.53

6 years ago

2.4.52

6 years ago

2.4.51

6 years ago

2.4.50

6 years ago

2.4.49

7 years ago

2.4.48

7 years ago

2.4.47

7 years ago

2.4.46

7 years ago

2.4.45

7 years ago

2.4.44

7 years ago

2.4.43

7 years ago

2.4.42

7 years ago

2.4.41

7 years ago

2.4.39

7 years ago

2.4.38

7 years ago

2.4.37

7 years ago

2.4.36

7 years ago

2.4.35

7 years ago

2.4.32

7 years ago

2.4.31

7 years ago

2.4.30

7 years ago

2.4.29

7 years ago

2.4.28

7 years ago

2.4.27

7 years ago

2.4.26

7 years ago

2.4.25

7 years ago

2.4.24

7 years ago

2.4.23

7 years ago

2.4.22

7 years ago

2.4.21

7 years ago

2.4.20

7 years ago

2.4.19

7 years ago

2.4.18

7 years ago

2.4.17

7 years ago

2.4.16

7 years ago

2.4.15

7 years ago

2.4.14

7 years ago

2.4.13

7 years ago

2.4.12

7 years ago

2.4.11

7 years ago

2.4.10

7 years ago

2.4.9

7 years ago

2.4.5

7 years ago

2.4.4

7 years ago

2.4.3

7 years ago

2.4.2

7 years ago

2.4.1

7 years ago

2.4.0

7 years ago

2.3.4

7 years ago

2.3.2

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.5

7 years ago

2.2.4

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

8 years ago

0.0.2

8 years ago