Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wzr1337/node.koa.webpack.starter
A starter project for folks who want to use koa with webpack and typescript
https://github.com/wzr1337/node.koa.webpack.starter
backend javascript koa2 nodejs typescript webpack
Last synced: 4 days ago
JSON representation
A starter project for folks who want to use koa with webpack and typescript
- Host: GitHub
- URL: https://github.com/wzr1337/node.koa.webpack.starter
- Owner: wzr1337
- License: mit
- Created: 2018-01-12T16:28:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-18T08:57:12.000Z (almost 7 years ago)
- Last Synced: 2024-11-10T18:35:13.520Z (2 months ago)
- Topics: backend, javascript, koa2, nodejs, typescript, webpack
- Language: JavaScript
- Homepage: http://muckibu.de/webpack-nodejs-express-fueled-typescript/
- Size: 50.8 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Webpack Starter Project integrated with koa
If you are looking for an express based starter project, you might want to check [https://github.com/wzr1337/node.express.webpack.starter].
Please find a detailled explaination of why I chose to use which component and all the tweaks I had to do on my blog:
[http://hack.Muckibu.de](http://muckibu.de/?p=355&preview=true)
## Components
### Node JS
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js is mainly used for backend and build chain tasks. For more information, visit (https://nodejs.org/en/)### KoaJS
Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs. Through leveraging generators Koa allows you to ditch callbacks and greatly increase error-handling. Koa does not bundle any middleware within core, and provides an elegant suite of methods that make writing servers fast and enjoyable. Find more info on (http://koajs.com/).### WebPack
Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset.
In this project, we use webpack to transpile and bundle the NodeJS code written in typescript.
For more detailed information, look here : (https://webpack.js.org/)### Typescript
TypeScript is a free and open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language. (from [Wikipedia](https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=22&cad=rja&uact=8&ved=0ahUKEwjQ4LKl2rfYAhUF1hQKHanCDWAQmhMIvwEwFQ&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FTypeScript&usg=AOvVaw0POHuGGBSA531WKDolJ7xx))
For more detailed information, look here : (https://www.typescriptlang.org/)## Development
### build
In order, to build the software (once per call), use```bash
$ npm run build
```The webpack packager will do the work for you and you will find `dist/index.js` afterwards.
### run
```bash
$ node dist/index.js
```will run the software for you
### (live) reload / watch
To watch the source files, build on demand and run software,
```bash
$ npm run watch
```is made available.