Git Product home page Git Product logo

tsmean's Introduction

Disclaimer

Nobody is actively developing tsmean. This means that it's not recommended to use this as a starting point for new applications anymore. You can let yourself be inspired by the project, but don't fork it for your new projects.


tsmean logo

This is a starter kit for webapps completely written in TypeScript.

The starter kit is using the following technologies:

  • MySQL
  • ExpressJS
  • Angular 6
  • NodeJs

... and that's why it's called tsmean! We've carefully elected those technologies to be the best suit for building web apps with TypeScript. You get to use TypeScript now on the client and the server! This leads to efficiency through consistency. Read more about it here: www.tsmean.com.

Installation

Prerequisits

Install

Cloning the project

git clone https://github.com/tsmean/tsmean your-project-name
cd your-project-name

Setting up the database

The easiest way to set up the MySQL database is to use docker and run:

docker run -p 3306:3306 --name mysql tsmean/mysql:2

This spins up a docker container with a MySQL instance that has matching settings with the backend. Read more about the "MySQL in docker" option here. You can also set up MySQL directly on your system and create the databases with settings like you find them in backend/properties/development.properties and backend/properties/test.properties manually. Of course, you can also change the settings you find there to match your needs (for example setting a different user or password or database name).

Installing all node modules

npm install

Under the hood lerna is used to install the multiple packages in backend, frontend and shared, but you don't need to be concerned with this too much for now.

Backend

First cd backend, then:

  • to spin up a REST-API server npm start. Check it out at http://localhost:4242
  • To run the tests npm test

Frontend

First cd frontend, then:

  • to start the Angular app npm start. Check it out on http://localhost:4200
  • you can develop all modules independently. For example, cd src/app/user and run ng serve. This launches a minimal app only displaying the user module (i.e. without login etc). You can test all modules using ng test.

More info available in frontend docs.

Live Demo

https://demo.tsmean.com

screenshot

Homepage

http://www.tsmean.com

tsmean's People

Contributors

bersling avatar michallytek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tsmean's Issues

Backend Crash

The backend used to run but has now stopped working.
image

How to add Facebook, Twitter authentication

Please let me know if you are working on social media authentication to this. If so, how soon can I expect the functionality? Could you please share some gist, so that I can implement it in my local workspace.

Deployment on Heroku

Hi,

I'm trying to deploy my project on Heroku but I have lot of errors..

` > [email protected] install /tmp/build/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0

   > [email protected] postinstall /tmp/build
   > npm run gitinit && ts-node install.ts


   > [email protected] gitinit /tmp/build
   > git submodule init && git submodule update

   fatal: Not a git repository (or any of the parent directories): .git

   npm ERR! Linux 4.4.0-97-generic
   npm ERR! argv "/tmp/build/.heroku/node/bin/node" "/tmp/build/.heroku/node/bin/npm" "run" "gitinit"
   npm ERR! node v6.11.5
   npm ERR! npm  v3.10.10
   npm ERR! code ELIFECYCLE
   npm ERR! [email protected] gitinit: `git submodule init && git submodule update`
   npm ERR! Exit status 128
   npm ERR!
   npm ERR! Failed at the [email protected] gitinit script 'git submodule init && git submodule update'.
   npm ERR! Make sure you have the latest version of node.js and npm installed.
   npm ERR! If you do, this is most likely a problem with the ts-mean package,
   npm ERR! not with npm itself.
   npm ERR! Tell the author that this fails on your system:
   npm ERR!     git submodule init && git submodule update
   npm ERR! You can get information on how to open an issue for this project with:
   npm ERR!     npm bugs ts-mean
   npm ERR! Or if that isn't available, you can get their info via:
   npm ERR!     npm owner ls ts-mean
   npm ERR! There is likely additional logging output above.

   npm ERR! Please include the following file with any support request:
   npm ERR!     /tmp/build/npm-debug.log

   npm ERR! Linux 4.4.0-97-generic
   npm ERR! argv "/tmp/build/.heroku/node/bin/node" "/tmp/build/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build/.npmrc"
   npm ERR! node v6.11.5
   npm ERR! npm  v3.10.10
   npm ERR! code ELIFECYCLE
   npm ERR! [email protected] postinstall: `npm run gitinit && ts-node install.ts`
   npm ERR! Exit status 1
   npm ERR!
   npm ERR! Failed at the [email protected] postinstall script 'npm run gitinit && ts-node install.ts'.
   npm ERR! Make sure you have the latest version of node.js and npm installed.
   npm ERR! If you do, this is most likely a problem with the ts-mean package,
   npm ERR! not with npm itself.
   npm ERR! Tell the author that this fails on your system:
   npm ERR!     npm run gitinit && ts-node install.ts
   npm ERR! You can get information on how to open an issue for this project with:
   npm ERR!     npm bugs ts-mean
   npm ERR! Or if that isn't available, you can get their info via:
   npm ERR!     npm owner ls ts-mean
   npm ERR! There is likely additional logging output above.

   npm ERR! Please include the following file with any support request:
   npm ERR!     /tmp/build/npm-debug.log

-----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys `

Maybe you have an idea ?

Make builds less flaky

Build errors due to flakyness so far:

  • docker: Error response from daemon: No such container: mysql.

Path incorrect when i use npm start

ERROR in node_modules/@tsmean/shared/src/models/user.model.ts(1,24): error TS2307: Cannot find module '../../../frontend/resource/src/app/resource/resource'.

i think it should "./resource.model" but not sure why it build to '../../../frontend/resource/src/app/resource/resource'.

Could not find test files

I cloned and installed repo from the command line. npm start starts the server, but npm test creates this error

```

[email protected] test C:\Users\cliff\WebstormProjects\projectname\backend
> mocha --reporter spec --compilers ts:ts-node/register '**/*.test.ts'

Warning: Could not find any test files matching pattern: '**/*.test.ts'
No test files found
npm ERR! Test failed.  See above for more details.

Cannot find module

I'm running npm start from backend folder. Getting the following error.

cross-env NODE_ENV=development tsc && node dist/server.js

module.js:545
    throw err;
    ^

Error: Cannot find module 'E:\Users\arputharajv\testworkspace\tsmean\backend\dist\server.js'

Note:
The transpiled files are put in "tsmean\backend\dist\backend\src" directory

dist
├───backend
│   └───src
│       ├───animal
│       ├───animal-list
│       ├───auth
│       │   ├───passport
│       │   └───password-cryptographer
│       ├───common
│       │   ├───decorators
│       │   ├───exceptions
│       │   ├───filters
│       │   ├───interceptors
│       │   ├───middlewares
│       │   └───pipes
│       ├───config
│       ├───database
│       ├───logger
│       ├───user
│       ├───validation
│       │   ├───email
│       │   └───password
│       └───welcome
└───shared
    └───src
        ├───dto
        │   ├───animal
        │   ├───animal-list
        │   └───user
        └───models

How i can run migrations

I try follow what type orm doc, but not work, thanks and if i can contribute with this project i will enjoy this opportunity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.