nkowaokwu / igbo_api

An API exposing Igbo words, definitions, and more
https://igboapi.com
Apache License 2.0
316 stars 141 forks source link

Convert `src/middleware` to TS #670

Closed ijemmao closed 1 year ago

ijemmao commented 1 year ago

Is your feature request related to a problem? Please describe. Convert src/middleware to TS

Describe the solution you'd like Convert src/middleware to TS

Avoid making logic changes to these files. Some of these files will need new types and interfaces, add them wherever necessary.

Prettier will format these files which is okay.

Describe alternatives you've considered N/A

Additional context N/A

adex-codez commented 1 year ago

I would like to fix this issue

ijemmao commented 1 year ago

@adex-codez go for it!

adex-codez commented 1 year ago

Thank you

adex-codez commented 1 year ago

All this is very new to me am i to fork or clone the repo

ijemmao commented 1 year ago

feel free to ask clarifying questions here or in your PR~

adex-codez commented 1 year ago

am i to fork or clone the repo to work on the issue

adex-codez commented 1 year ago

do you want the developer date to be in a timestamp format

adex-codez commented 1 year ago

when i run yarn dev it gives me this error $ mongod --port 27017 --dbpath ./db --quiet &>/dev/null The syntax of the command is incorrect.

ijemmao commented 1 year ago

@adex-codez these are great questions/comments 😄

  1. you can refer to our Contribution guide to learn more about our contribution process - if it doesn't answer your questions, lmk so i can update it!
  2. you don't need to worry about changing the logic within the code - rather you can just focus on converting the files from JS to TS and then create any new types/interfaces to ensure that our TS checks can pass
  3. The syntax of this command isn't necessarily incorrect 😅 it might not play nice with non-MacOS OS - can you lmk what OS you're using?
    • Also make sure that you have MongoDB installed on your system along with Java!
chidexebere commented 1 year ago

Hi @ijemmao,

I could not find the best place to ask this ( I could not log into the slack channel ).

  1. I have followed the README and contributing guide, but I am still having trouble running this project locally.

From the Firebase Configuration Guide:

"projects": { "default": "chidexebere-igbo-api", "staging": "chidexebere-igbo-api" }



 - Also, when editing the `src/service/firebase.ts` file , do I replace with my **FIREBASE_CONFIG** object for both **STAGING_FIREBASE_CONFIG** and **PRODUCTION_FIREBASE_CONFIG**.

2.  I do not understand how this works for this project:
When I make a PR my `.firebaserc` and `src/service/firebase.ts` files will change because of the Firebase Configuration Guide.
- Will this be reverted to the ***igbo-api-bb22d*** config before my PR is merged?

- Does this mean that I have to always change the *.firebaserc* and *src/service/firebase.ts* files whenever I make a pull from upstream?
ijemmao commented 1 year ago

@chidexebere hey! try to fill out the volunteer form again so you can join the Slack channel - it will be much easier to address these questions.

But I can answer your question! For the first two bullets, yes. You updated the .firebaserc and firebase.ts files correctly.

We have a .gitignore line for our firebaserc file (but not yet for firebase.ts) so that way you can make as many changes as you want in those files without them getting committed into git.

This means for local dev, you'll always need to have your firebaserc and firebase.ts updated with your personal project details.

So essentially the steps are:

chidexebere commented 1 year ago

Hi @ijemmao,

Thanks for getting back to me.

Kindly share the volunteer form so I can join the Slack channel.

I still need clarifications.

Because I can not find any .firebaserc line in the .gitignore file.

This means I have to always change the .firebaserc and firebase.ts files locally whenever I make a pull from upstream. Right?

emulator-err

ijemmao commented 1 year ago

@chidexebere https://nkowaokwu.com/volunteer

That's one way to think about treating the firebase files. VSCode let's you select specific files that you want to commit so you could just select the files that you want to commit for your PR.

The error screenshot you sent doesn't show the full logs so I might not be able to figure out this bug. We can talk more on slack once you join .

chidexebere commented 1 year ago

@ijemmao , I am already on Slack, we can move this there

adex-codez commented 1 year ago

so i have come again when i run yarn build it gives me this error cp: cannot create directory './dist/dictionaries/ig-en': No such file or directory and also anytime i make a commit all the src/middleware files gets deleted

ijemmao commented 1 year ago

are you on windows @adex-codez ? that could be the reason why the script to create that directory isn't working

adex-codez commented 1 year ago

so what how i my going to resolve the issue

ijemmao commented 1 year ago

this is a bug that needs to be fixed within this repo - so I recommend creating a new ticket describing your blocker - from there a contributor, who's working with Windows, can create a solution to help unblock you from this work

adex-codez commented 1 year ago

I am so sorry i have not given feedback on the project because throughout these past weeks I have been busy and some of the problems i encountered during setting up the project locally, so I have unassigned myself sorry for the long wait.