-
Notifications
You must be signed in to change notification settings - Fork 2
Amazonadonna
First you'll need to install Node. These instructions should work for both Mac OS and Windows.
First run npm install
- To run the server in a dev environment, run
npm startto havetsctranspile and watch your server files and nodemon starts the express server onhttp://localhost:3000/
Server.ts serves that html file and any other APIs/routes you may want to add. tsc is used to transpile the back-end typescript into javascript, and nodemon is used to serve the ./dist/server.js file that is generated from tsc.
To build the files, run npm run build which will transpile server.ts to server.js, which can be ran with node ./dist/server.js. (Or run npm run start:prod to do this for you, with the PROD env variable set to true)
- Run
npm startin a terminal - Run the
Debugconfiguration from the debug menu, add breakpoints where needed - Use any chrome window to navigate to
http://localhost:3000/
There are 2 tsconfig files, tsonfig.backend.json which extend tsconfig.json as the base configuration. The tslint extension (see below) only looks for tsconfig.json (as of the time of writing this there is no config option to change that), so all of the linting is done based off of what is in tsconfig.json.
The following is a list of optional dev tooling that I included to help my workflow:
- TSLint: A linter for Typescript. My linting settings are checked into the repo under
tslint.json. (Can either be run withnpm run lintor use the VSCode extension for in editor linting) - Prettier: A formatter to autostyle my code. You need the
prettierVSCode extension. Prettier uses.prettierrc.jsonto set auto-formatting style. Make sure your prettier settings match your tslint settings, for example,tslint.jsonis set up to never allow semicolons unless necessary, so my.prettierrc.jsonauto removes semicolons unless necessary.
- Web service which provides cloud computing capacity.
- Used as a server to handle internal API calls from the front end to DynamoDB.
- Learn more here.
- Open-source JavaScript run-time environment which executes JavaScript outside of browser
- Used to implement custom APIs hosted on EC2
- Learn more here.
- NoSQL database hosted on AWS. Learn more here.
- Entries are stored as JSON objects and can be queried using the primary key or Global Secondary Indexes.
- Accessed for read/write on AWS EC2.
- Download Android Studio from here.
- The testing framework is included in the Gradle build files so no other setup required.
- Build environment for backend server/connection to database. No setup required.
- Build environment for frontend with Android Studio in Kotlin. No setup required.
- Travis is linked to this Github repo so no individual setup required. Will build on all push/merge actions.